pub struct ImmutableStorage { /* private fields */ }Expand description
Immutable storage engine
Implementations§
Source§impl ImmutableStorage
impl ImmutableStorage
Sourcepub async fn new(config: ImmutableConfig) -> Result<Self, OxirsError>
pub async fn new(config: ImmutableConfig) -> Result<Self, OxirsError>
Create new immutable storage
Sourcepub async fn store_triples(
&self,
triples: &[Triple],
message: &str,
) -> Result<Commit, OxirsError>
pub async fn store_triples( &self, triples: &[Triple], message: &str, ) -> Result<Commit, OxirsError>
Store triples as immutable blocks
Sourcepub async fn read_commit(
&self,
commit_hash: ContentHash,
) -> Result<Vec<Triple>, OxirsError>
pub async fn read_commit( &self, commit_hash: ContentHash, ) -> Result<Vec<Triple>, OxirsError>
Read triples from a commit
Sourcepub async fn query_triples(
&self,
pattern: &TriplePattern,
commit_hash: Option<ContentHash>,
) -> Result<Vec<Triple>, OxirsError>
pub async fn query_triples( &self, pattern: &TriplePattern, commit_hash: Option<ContentHash>, ) -> Result<Vec<Triple>, OxirsError>
Query triples with pattern matching
Sourcepub async fn verify_integrity(&self) -> Result<IntegrityReport, OxirsError>
pub async fn verify_integrity(&self) -> Result<IntegrityReport, OxirsError>
Verify integrity of storage
Sourcepub async fn garbage_collect(&self) -> Result<GCReport, OxirsError>
pub async fn garbage_collect(&self) -> Result<GCReport, OxirsError>
Run garbage collection
Auto Trait Implementations§
impl Freeze for ImmutableStorage
impl !RefUnwindSafe for ImmutableStorage
impl Send for ImmutableStorage
impl Sync for ImmutableStorage
impl Unpin for ImmutableStorage
impl UnsafeUnpin for ImmutableStorage
impl !UnwindSafe for ImmutableStorage
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