pub struct SimpleStorageEngine { /* private fields */ }Expand description
Simple file-based storage engine implementation
Implementations§
Source§impl SimpleStorageEngine
impl SimpleStorageEngine
Sourcepub async fn new(config: StorageConfig) -> Result<Self, OxirsError>
pub async fn new(config: StorageConfig) -> Result<Self, OxirsError>
Create a new simple storage engine
Trait Implementations§
Source§impl StorageEngine for SimpleStorageEngine
impl StorageEngine for SimpleStorageEngine
Source§fn init<'life0, 'async_trait>(
&'life0 mut self,
_config: StorageConfig,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init<'life0, 'async_trait>(
&'life0 mut self,
_config: StorageConfig,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize the storage engine
Source§fn store_triple<'life0, 'life1, 'async_trait>(
&'life0 self,
triple: &'life1 Triple,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_triple<'life0, 'life1, 'async_trait>(
&'life0 self,
triple: &'life1 Triple,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store a triple
Source§fn store_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
triples: &'life1 [Triple],
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
triples: &'life1 [Triple],
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store multiple triples
Source§fn query_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
pattern: &'life1 TriplePattern,
) -> Pin<Box<dyn Future<Output = Result<Vec<Triple>, OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
pattern: &'life1 TriplePattern,
) -> Pin<Box<dyn Future<Output = Result<Vec<Triple>, OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Query triples by pattern
Source§fn delete_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
pattern: &'life1 TriplePattern,
) -> Pin<Box<dyn Future<Output = Result<usize, OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
pattern: &'life1 TriplePattern,
) -> Pin<Box<dyn Future<Output = Result<usize, OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete triples by pattern
Source§fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StorageStats, OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StorageStats, OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get storage statistics
Source§fn optimize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn optimize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Optimize storage
Auto Trait Implementations§
impl Freeze for SimpleStorageEngine
impl !RefUnwindSafe for SimpleStorageEngine
impl Send for SimpleStorageEngine
impl Sync for SimpleStorageEngine
impl Unpin for SimpleStorageEngine
impl UnsafeUnpin for SimpleStorageEngine
impl !UnwindSafe for SimpleStorageEngine
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