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'.

  1. int opApply(int delegate(ref Bson obj) del)
  2. int opApply(int delegate(ref size_t idx, ref Bson obj) del)
  3. int opApply(int delegate(ref string idx, ref Bson obj) del)
    struct Bson
    const
    int
    opApply
    (
    int delegate
    (
    ref string idx
    ,
    ref Bson obj
    )
    del
    )

Meta