elementSize static method

int elementSize(
  1. String? name,
  2. Object? value
)

Implementation

static int elementSize(String? name, Object? value) {
  var size = 1;
  if (name != null) {
    size += Statics.getKeyUtf8(name).length + 1;
  }
  return size + BsonObject.bsonObjectFrom(value).byteLength();
}