pub trait Collection: Debug + Send + Sync {
fn collection_name() -> CollectionName;
fn define_views(schema: &mut Schematic) -> Result<(), Error>;
fn encryption_key() -> Option<KeyId> { ... }
}
Expand description
A namespaced collection of Document<Self>
items and views.
Required methods
fn collection_name() -> CollectionName
fn collection_name() -> CollectionName
The Id
of this collection.
Provided methods
fn encryption_key() -> Option<KeyId>
fn encryption_key() -> Option<KeyId>
If a KeyId
is returned, this collection will be stored encrypted
at-rest using the key specified.