pub trait BsonSchema {
    fn bson_schema() -> Document;
}
Expand description

Types which can be expressed/validated by a MongoDB-flavored JSON schema.

Required Methods§

Returns a BSON document describing the MongoDB-flavored schema of this type.

Implementations on Foreign Types§

Do NOT assume sizeof(usize) <= sizeof(u64)!!!

Do NOT assume sizeof(isize) <= sizeof(i64)!!!

TODO(H2CO3): maybe specialize as binary for [u8]?

TODO(H2CO3): maybe specialize for Cow<[u8]> as binary?

TODO(H2CO3): maybe specialize for Vec<u8> as binary?

Implementors§