Trait mongodm::ToRepository

source ·
pub trait ToRepository {
    // Required methods
    fn repository<M: Model>(&self) -> Repository<M>;
    fn repository_with_options<M: Model>(
        &self,
        options: CollectionOptions
    ) -> Repository<M>;
}
Expand description

Utilities methods to get a Repository. Implemented for mongodb::Database.

Required Methods§

source

fn repository<M: Model>(&self) -> Repository<M>

Shorthand for Repository::<Model>::new.

source

fn repository_with_options<M: Model>( &self, options: CollectionOptions ) -> Repository<M>

Shorthand for Repository::<Model>::new_with_options.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ToRepository for Database

Implementors§