Trait magnet_schema::BsonSchema[][src]

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

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

impl BsonSchema for bool
[src]

impl BsonSchema for u8
[src]

impl BsonSchema for u16
[src]

impl BsonSchema for u32
[src]

impl BsonSchema for u64
[src]

impl BsonSchema for i8
[src]

impl BsonSchema for i16
[src]

impl BsonSchema for i32
[src]

impl BsonSchema for i64
[src]

impl BsonSchema for usize
[src]

impl BsonSchema for isize
[src]

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

impl BsonSchema for f32
[src]

impl BsonSchema for f64
[src]

impl BsonSchema for str
[src]

impl BsonSchema for String
[src]

impl BsonSchema for OsStr
[src]

impl BsonSchema for OsString
[src]

impl BsonSchema for Path
[src]

impl BsonSchema for PathBuf
[src]

impl<'a, T: ?Sized> BsonSchema for &'a T where
    T: BsonSchema
[src]

impl<'a, T: ?Sized> BsonSchema for &'a mut T where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T] where
    T: BsonSchema
[src]

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

impl<T> BsonSchema for [T; 0] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 1] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 2] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 3] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 4] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 5] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 6] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 7] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 8] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 9] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 10] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 11] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 12] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 13] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 14] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 15] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 16] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 17] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 18] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 19] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 20] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 21] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 22] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 23] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 24] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 25] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 26] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 27] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 28] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 29] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 30] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 31] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 32] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 33] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 34] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 35] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 36] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 37] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 38] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 39] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 40] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 41] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 42] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 43] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 44] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 45] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 46] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 47] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 48] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 49] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 50] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 51] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 52] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 53] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 54] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 55] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 56] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 57] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 58] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 59] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 60] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 61] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 62] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 63] where
    T: BsonSchema
[src]

impl<T> BsonSchema for [T; 64] where
    T: BsonSchema
[src]

impl BsonSchema for ()
[src]

impl<A, B> BsonSchema for (A, B) where
    A: BsonSchema,
    B: BsonSchema
[src]

impl<A, B, C> BsonSchema for (A, B, C) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema
[src]

impl<A, B, C, D> BsonSchema for (A, B, C, D) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema
[src]

impl<A, B, C, D, E> BsonSchema for (A, B, C, D, E) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema,
    E: BsonSchema
[src]

impl<A, B, C, D, E, F> BsonSchema for (A, B, C, D, E, F) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema,
    E: BsonSchema,
    F: BsonSchema
[src]

impl<A, B, C, D, E, F, G> BsonSchema for (A, B, C, D, E, F, G) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema,
    E: BsonSchema,
    F: BsonSchema,
    G: BsonSchema
[src]

impl<A, B, C, D, E, F, G, H> BsonSchema for (A, B, C, D, E, F, G, H) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema,
    E: BsonSchema,
    F: BsonSchema,
    G: BsonSchema,
    H: BsonSchema
[src]

impl<A, B, C, D, E, F, G, H, I> BsonSchema for (A, B, C, D, E, F, G, H, I) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema,
    E: BsonSchema,
    F: BsonSchema,
    G: BsonSchema,
    H: BsonSchema,
    I: BsonSchema
[src]

impl<A, B, C, D, E, F, G, H, I, J> BsonSchema for (A, B, C, D, E, F, G, H, I, J) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema,
    E: BsonSchema,
    F: BsonSchema,
    G: BsonSchema,
    H: BsonSchema,
    I: BsonSchema,
    J: BsonSchema
[src]

impl<A, B, C, D, E, F, G, H, I, J, K> BsonSchema for (A, B, C, D, E, F, G, H, I, J, K) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema,
    E: BsonSchema,
    F: BsonSchema,
    G: BsonSchema,
    H: BsonSchema,
    I: BsonSchema,
    J: BsonSchema,
    K: BsonSchema
[src]

impl<A, B, C, D, E, F, G, H, I, J, K, L> BsonSchema for (A, B, C, D, E, F, G, H, I, J, K, L) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema,
    E: BsonSchema,
    F: BsonSchema,
    G: BsonSchema,
    H: BsonSchema,
    I: BsonSchema,
    J: BsonSchema,
    K: BsonSchema,
    L: BsonSchema
[src]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> BsonSchema for (A, B, C, D, E, F, G, H, I, J, K, L, M) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema,
    E: BsonSchema,
    F: BsonSchema,
    G: BsonSchema,
    H: BsonSchema,
    I: BsonSchema,
    J: BsonSchema,
    K: BsonSchema,
    L: BsonSchema,
    M: BsonSchema
[src]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> BsonSchema for (A, B, C, D, E, F, G, H, I, J, K, L, M, N) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema,
    E: BsonSchema,
    F: BsonSchema,
    G: BsonSchema,
    H: BsonSchema,
    I: BsonSchema,
    J: BsonSchema,
    K: BsonSchema,
    L: BsonSchema,
    M: BsonSchema,
    N: BsonSchema
[src]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> BsonSchema for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema,
    E: BsonSchema,
    F: BsonSchema,
    G: BsonSchema,
    H: BsonSchema,
    I: BsonSchema,
    J: BsonSchema,
    K: BsonSchema,
    L: BsonSchema,
    M: BsonSchema,
    N: BsonSchema,
    O: BsonSchema
[src]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> BsonSchema for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) where
    A: BsonSchema,
    B: BsonSchema,
    C: BsonSchema,
    D: BsonSchema,
    E: BsonSchema,
    F: BsonSchema,
    G: BsonSchema,
    H: BsonSchema,
    I: BsonSchema,
    J: BsonSchema,
    K: BsonSchema,
    L: BsonSchema,
    M: BsonSchema,
    N: BsonSchema,
    O: BsonSchema,
    P: BsonSchema
[src]

impl<'a, T: ?Sized> BsonSchema for Cow<'a, T> where
    T: Clone + BsonSchema
[src]

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

impl<T> BsonSchema for Cell<T> where
    T: BsonSchema
[src]

impl<T: ?Sized> BsonSchema for Box<T> where
    T: BsonSchema
[src]

impl<T: ?Sized> BsonSchema for Rc<T> where
    T: BsonSchema
[src]

impl<T: ?Sized> BsonSchema for Arc<T> where
    T: BsonSchema
[src]

impl<T: ?Sized> BsonSchema for RefCell<T> where
    T: BsonSchema
[src]

impl<T: ?Sized> BsonSchema for Mutex<T> where
    T: BsonSchema
[src]

impl<T: ?Sized> BsonSchema for RwLock<T> where
    T: BsonSchema
[src]

impl<T> BsonSchema for Vec<T> where
    T: BsonSchema
[src]

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

impl<T> BsonSchema for Option<T> where
    T: BsonSchema
[src]

impl<T, H> BsonSchema for HashSet<T, H> where
    T: BsonSchema,
    H: BuildHasher
[src]

impl<T> BsonSchema for BTreeSet<T> where
    T: BsonSchema
[src]

impl<K, V, H> BsonSchema for HashMap<K, V, H> where
    K: ToString,
    V: BsonSchema,
    H: BuildHasher
[src]

impl<K, V> BsonSchema for BTreeMap<K, V> where
    K: ToString,
    V: BsonSchema
[src]

Implementors