pub struct RdfStateMachine { /* private fields */ }Expand description
RDF state machine
Implementations§
Source§impl RdfStateMachine
impl RdfStateMachine
Sourcepub fn execute(&mut self, operation: RdfOperation) -> Result<OperationResult>
pub fn execute(&mut self, operation: RdfOperation) -> Result<OperationResult>
Execute an RDF operation
Sourcepub fn get_state_digest(&self) -> Vec<u8> ⓘ
pub fn get_state_digest(&self) -> Vec<u8> ⓘ
Get state digest
Sourcepub fn calculate_digest(&mut self) -> Vec<u8> ⓘ
pub fn calculate_digest(&mut self) -> Vec<u8> ⓘ
Calculate state digest (mutable version with caching)
Sourcepub fn triple_count(&self) -> usize
pub fn triple_count(&self) -> usize
Get current triple count
Sourcepub fn operation_count(&self) -> u64
pub fn operation_count(&self) -> u64
Get operation count
Sourcepub fn contains_triple(&self, triple: &SerializableTriple) -> Result<bool>
pub fn contains_triple(&self, triple: &SerializableTriple) -> Result<bool>
Check if a triple exists
Sourcepub fn get_all_triples(&self) -> Vec<SerializableTriple>
pub fn get_all_triples(&self) -> Vec<SerializableTriple>
Get all triples (for debugging/testing)
Sourcepub fn apply_batch(
&mut self,
operations: Vec<RdfOperation>,
) -> Result<Vec<OperationResult>>
pub fn apply_batch( &mut self, operations: Vec<RdfOperation>, ) -> Result<Vec<OperationResult>>
Apply a batch of operations atomically
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RdfStateMachine
impl RefUnwindSafe for RdfStateMachine
impl Send for RdfStateMachine
impl Sync for RdfStateMachine
impl Unpin for RdfStateMachine
impl UnsafeUnpin for RdfStateMachine
impl UnwindSafe for RdfStateMachine
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