pub struct StorageFactory;Expand description
Storage factory for creating different storage backends
Implementations§
Source§impl StorageFactory
impl StorageFactory
Sourcepub fn create_memory() -> Box<dyn DocumentStorage>
pub fn create_memory() -> Box<dyn DocumentStorage>
Create in-memory storage
Sourcepub fn create_file(_path: &str) -> Result<Box<dyn DocumentStorage>>
pub fn create_file(_path: &str) -> Result<Box<dyn DocumentStorage>>
Create file-based storage
Sourcepub fn create_database(
_connection_string: &str,
) -> Result<Box<dyn DocumentStorage>>
pub fn create_database( _connection_string: &str, ) -> Result<Box<dyn DocumentStorage>>
Create database storage
Sourcepub fn create_vector_db(
_config: HashMap<String, String>,
) -> Result<Box<dyn DocumentStorage>>
pub fn create_vector_db( _config: HashMap<String, String>, ) -> Result<Box<dyn DocumentStorage>>
Create vector database storage
Auto Trait Implementations§
impl Freeze for StorageFactory
impl RefUnwindSafe for StorageFactory
impl Send for StorageFactory
impl Sync for StorageFactory
impl Unpin for StorageFactory
impl UnwindSafe for StorageFactory
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