Method Bson.opApply

Allows foreach iterating over BSON objects and arrays.

Note that although D requires to provide a 'ref' argument for opApply, in-place editing of the array/object fields is not possible. Any modification attempty will work on a temporary, even if the loop variable is declared 'ref'.

Prototypes

int opApply(
  int delegate(ref Bson obj) del
) const;

int opApply(
  int delegate(ref ulong idx, ref Bson obj) del
) const;

int opApply(
  int delegate(ref string idx, ref Bson obj) del
) const;

Authors

Sönke Ludwig

Copyright

© 2012 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.