pub struct RepositoryFactory { /* private fields */ }Implementations§
Source§impl RepositoryFactory
impl RepositoryFactory
pub fn new() -> Self
pub fn bind(register: impl Fn(&RepositoryFactory) + Send + Sync + 'static)
pub fn reset_binders()
pub fn register<T: Entity>(&self, repository: Arc<dyn ICRUDRepository<T>>)
pub fn register_named<T: Entity>( &self, type_name: impl Into<String>, plural_name: impl Into<String>, create: impl Fn(Arc<dyn Connection>) -> Result<Arc<dyn ICRUDRepository<T>>> + Send + Sync + 'static, create_readonly: impl Fn(Arc<dyn Connection>) -> Arc<dyn IReadonlyRepository<T>> + Send + Sync + 'static, )
pub fn create<T: Entity>(&self) -> Result<Arc<dyn ICRUDRepository<T>>>
pub fn create_named<T: Entity>( &self, name: &str, connection: Arc<dyn Connection>, ) -> Result<Arc<dyn ICRUDRepository<T>>>
pub fn create_readonly_named<T: Entity>( &self, name: &str, connection: Arc<dyn Connection>, ) -> Result<Arc<dyn IReadonlyRepository<T>>>
pub fn access( &self, name: &str, connection: Arc<dyn Connection>, ) -> RepositoryAccess
Trait Implementations§
Source§impl Clone for RepositoryFactory
impl Clone for RepositoryFactory
Source§impl Default for RepositoryFactory
impl Default for RepositoryFactory
Auto Trait Implementations§
impl Forget for RepositoryFactory
impl Freeze for RepositoryFactory
impl Move for RepositoryFactory
impl RefUnwindSafe for RepositoryFactory
impl Send for RepositoryFactory
impl Sync for RepositoryFactory
impl Unpin for RepositoryFactory
impl UnsafeUnpin for RepositoryFactory
impl UnwindSafe for RepositoryFactory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more