pub struct RdfCrdt { /* private fields */ }
Expand description
RDF-specific CRDT optimized for triple stores
Implementations§
Source§impl RdfCrdt
impl RdfCrdt
Sourcepub async fn new(config: CrdtConfig) -> Result<Self, OxirsError>
pub async fn new(config: CrdtConfig) -> Result<Self, OxirsError>
Create new RDF CRDT
Sourcepub async fn add_triple(&mut self, triple: Triple) -> Result<(), OxirsError>
pub async fn add_triple(&mut self, triple: Triple) -> Result<(), OxirsError>
Add triple
Sourcepub async fn remove_triple(&mut self, triple: &Triple) -> Result<(), OxirsError>
pub async fn remove_triple(&mut self, triple: &Triple) -> Result<(), OxirsError>
Remove triple
Sourcepub async fn query(
&self,
pattern: &TriplePattern,
) -> Result<Vec<Triple>, OxirsError>
pub async fn query( &self, pattern: &TriplePattern, ) -> Result<Vec<Triple>, OxirsError>
Query triples by pattern
Sourcepub async fn merge(&mut self, other: &RdfCrdt) -> Result<(), OxirsError>
pub async fn merge(&mut self, other: &RdfCrdt) -> Result<(), OxirsError>
Merge with another RDF CRDT
Sourcepub fn get_delta(&self) -> RdfCrdtDelta
pub fn get_delta(&self) -> RdfCrdtDelta
Get delta for synchronization
Sourcepub async fn apply_delta(
&mut self,
delta: RdfCrdtDelta,
) -> Result<(), OxirsError>
pub async fn apply_delta( &mut self, delta: RdfCrdtDelta, ) -> Result<(), OxirsError>
Apply delta from another replica
Sourcepub fn reset_delta(&mut self)
pub fn reset_delta(&mut self)
Reset delta tracking
Sourcepub async fn garbage_collect(&mut self) -> Result<GcReport, OxirsError>
pub async fn garbage_collect(&mut self) -> Result<GcReport, OxirsError>
Garbage collect tombstones
Sourcepub async fn stats(&self) -> CrdtStatsReport
pub async fn stats(&self) -> CrdtStatsReport
Get statistics
Auto Trait Implementations§
impl Freeze for RdfCrdt
impl !RefUnwindSafe for RdfCrdt
impl Send for RdfCrdt
impl Sync for RdfCrdt
impl Unpin for RdfCrdt
impl !UnwindSafe for RdfCrdt
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