pub struct VirtualStorage { /* private fields */ }Expand description
Virtual storage engine
Implementations§
Source§impl VirtualStorage
impl VirtualStorage
Sourcepub async fn new(config: VirtualStorageConfig) -> Result<Self, OxirsError>
pub async fn new(config: VirtualStorageConfig) -> Result<Self, OxirsError>
Create new virtual storage
Sourcepub async fn initialize_backends(&self) -> Result<(), OxirsError>
pub async fn initialize_backends(&self) -> Result<(), OxirsError>
Initialize backends
Sourcepub async fn start_migration(
&self,
source: &str,
target: &str,
criteria: SelectionCriteria,
) -> Result<String, OxirsError>
pub async fn start_migration( &self, source: &str, target: &str, criteria: SelectionCriteria, ) -> Result<String, OxirsError>
Start a migration job
Sourcepub async fn get_migration_status(
&self,
job_id: &str,
) -> Result<MigrationJob, OxirsError>
pub async fn get_migration_status( &self, job_id: &str, ) -> Result<MigrationJob, OxirsError>
Get migration status
Trait Implementations§
Source§impl StorageEngine for VirtualStorage
impl StorageEngine for VirtualStorage
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 VirtualStorage
impl !RefUnwindSafe for VirtualStorage
impl Send for VirtualStorage
impl Sync for VirtualStorage
impl Unpin for VirtualStorage
impl UnsafeUnpin for VirtualStorage
impl !UnwindSafe for VirtualStorage
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