pub struct VaultService { /* private fields */ }Expand description
Coordinates transactions, graph materialization, and crash recovery.
Implementations§
Source§impl VaultService
impl VaultService
pub fn open<W: AsRef<Path>, S: AsRef<Path>>( wal_path: W, storage_root: S, author_did: u64, ) -> Result<Self>
pub fn graph_quin_count(&self) -> usize
pub fn list_graph_quins(&self, limit: usize) -> Result<Vec<NQuin>>
pub fn graph_coverage( &self, journal_limit: usize, ) -> Result<Vec<GraphCoverageRow>>
pub fn journal_count(&self) -> Result<usize>
pub fn list_health_records(&self, limit: usize) -> Result<Vec<JournalEntry>>
pub fn list_receipts(&self, limit: usize) -> Result<Vec<ReceiptRecord>>
pub fn list_outbox(&self, limit: usize) -> Result<Vec<SyncOutboxEntry>>
pub fn outbox_queued_count(&self) -> Result<usize>
pub fn list_active_consents( &self, now_unix: u64, ) -> Result<Vec<ConsentGrantRecord>>
pub fn append_consent(&self, grant: &ConsentGrantRecord) -> Result<()>
pub fn revoke_consent(&self, grant_id: &str) -> Result<bool>
pub fn wal_buffered_quins(&mut self) -> Result<usize>
Sourcepub fn commit_quin(
&mut self,
quin: NQuin,
signing_key: &SigningKey,
principal_did_hash: u64,
) -> Result<WalHandoffResult>
pub fn commit_quin( &mut self, quin: NQuin, signing_key: &SigningKey, principal_did_hash: u64, ) -> Result<WalHandoffResult>
Appends a semantic mutation to the durable WAL.
Sourcepub fn checkpoint(&mut self) -> Result<[u8; 32]>
pub fn checkpoint(&mut self) -> Result<[u8; 32]>
Commits buffered WAL events into the content-addressed DAG, materializes graph, persists checkpoint.
pub fn last_checkpoint_hash(&self) -> Option<[u8; 32]>
pub fn checkpoint_meta(&self) -> Option<CheckpointMeta>
Sourcepub fn commit_envelope(
&mut self,
envelope: &RecordEnvelope,
signing_key: &SigningKey,
principal_did_hash: u64,
source: &str,
summary: Option<String>,
) -> Result<usize>
pub fn commit_envelope( &mut self, envelope: &RecordEnvelope, signing_key: &SigningKey, principal_did_hash: u64, source: &str, summary: Option<String>, ) -> Result<usize>
Converts a wellfare RecordEnvelope into NQuins and commits them.
pub fn append_receipt(&self, receipt: &ReceiptRecord) -> Result<()>
Auto Trait Implementations§
impl Freeze for VaultService
impl RefUnwindSafe for VaultService
impl Send for VaultService
impl Sync for VaultService
impl Unpin for VaultService
impl UnsafeUnpin for VaultService
impl UnwindSafe for VaultService
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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