Trait bonsaidb::core::schema::DefaultSerialization[][src]

pub trait DefaultSerialization: Collection {
    fn natural_id(&self) -> Option<Self::PrimaryKey> { ... }
}
Expand description

A convenience trait for easily storing Serde-compatible types in documents.

Provided methods

Returns the natural identifier of contents. This is called when pushing values into a collection, before attempting to automatically assign a unique id.

Implementors