pub struct StoreFactories { /* private fields */ }
Implementations§
Source§impl StoreFactories
impl StoreFactories
pub fn empty() -> Self
pub fn merge(&mut self, ext: StoreFactories)
pub fn add_backend( &mut self, name: &str, factory: Box<dyn Fn(&UserSettings, &Path) -> Result<Box<dyn Backend>, BackendLoadError>>, )
pub fn load_backend( &self, settings: &UserSettings, store_path: &Path, ) -> Result<Box<dyn Backend>, StoreLoadError>
pub fn add_op_store( &mut self, name: &str, factory: Box<dyn Fn(&UserSettings, &Path, RootOperationData) -> Result<Box<dyn OpStore>, BackendLoadError>>, )
pub fn load_op_store( &self, settings: &UserSettings, store_path: &Path, root_data: RootOperationData, ) -> Result<Box<dyn OpStore>, StoreLoadError>
pub fn add_op_heads_store( &mut self, name: &str, factory: Box<dyn Fn(&UserSettings, &Path) -> Result<Box<dyn OpHeadsStore>, BackendLoadError>>, )
pub fn load_op_heads_store( &self, settings: &UserSettings, store_path: &Path, ) -> Result<Box<dyn OpHeadsStore>, StoreLoadError>
pub fn add_index_store( &mut self, name: &str, factory: Box<dyn Fn(&UserSettings, &Path) -> Result<Box<dyn IndexStore>, BackendLoadError>>, )
pub fn load_index_store( &self, settings: &UserSettings, store_path: &Path, ) -> Result<Box<dyn IndexStore>, StoreLoadError>
pub fn add_submodule_store( &mut self, name: &str, factory: Box<dyn Fn(&UserSettings, &Path) -> Result<Box<dyn SubmoduleStore>, BackendLoadError>>, )
pub fn load_submodule_store( &self, settings: &UserSettings, store_path: &Path, ) -> Result<Box<dyn SubmoduleStore>, StoreLoadError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StoreFactories
impl !RefUnwindSafe for StoreFactories
impl !Send for StoreFactories
impl !Sync for StoreFactories
impl Unpin for StoreFactories
impl !UnwindSafe for StoreFactories
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more