pub struct SyncInbox { /* private fields */ }Expand description
Durable quarantined inbox (append-only jsonl). Admission validates, dedupes by operation id,
and records the outcome; only Validated records represent applicable operations.
Implementations§
Source§impl SyncInbox
impl SyncInbox
pub fn open(storage_root: impl AsRef<Path>) -> Result<Self>
Sourcepub fn admit(&self, op: &SyncOperation, now_unix: u32) -> Result<AdmitOutcome>
pub fn admit(&self, op: &SyncOperation, now_unix: u32) -> Result<AdmitOutcome>
Validate and durably record an inbound operation. Idempotent: a replayed id yields
Duplicate and is not applied again. Returns the admission outcome.
Sourcepub fn validated_operations(&self) -> Result<Vec<SyncOperation>>
pub fn validated_operations(&self) -> Result<Vec<SyncOperation>>
All admitted-Validated operations, in Lamport order (the applicable set).
pub fn list_recent(&self, limit: usize) -> Result<Vec<InboxRecord>>
Auto Trait Implementations§
impl Freeze for SyncInbox
impl RefUnwindSafe for SyncInbox
impl Send for SyncInbox
impl Sync for SyncInbox
impl Unpin for SyncInbox
impl UnsafeUnpin for SyncInbox
impl UnwindSafe for SyncInbox
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