pub struct HostDirJournalBackend { /* private fields */ }Expand description
Crash-durable journal composition over the canonical host-backed Table/Dir port.
V1 storage is a read-only compatibility prefix. The first v2 lease verifies that prefix and atomically selects its descriptor, a higher fence, and a fresh namespace. Every later append publishes immutable content-addressed leaves before comparing the complete state envelope.
Implementations§
Source§impl HostDirJournalBackend
impl HostDirJournalBackend
Sourcepub fn open(
port: Arc<dyn HostDirPort>,
capabilities: BackendCapabilities,
work_bound: usize,
) -> Result<Self, JournalError>
pub fn open( port: Arc<dyn HostDirPort>, capabilities: BackendCapabilities, work_bound: usize, ) -> Result<Self, JournalError>
Opens a binding and verifies the complete committed closure.
Sourcepub fn capabilities(&self) -> BackendCapabilities
pub fn capabilities(&self) -> BackendCapabilities
Reports the capability evidence used to admit or refuse writes.
Sourcepub fn state_envelope(
&self,
) -> Result<Option<NativeStateEnvelope>, JournalError>
pub fn state_envelope( &self, ) -> Result<Option<NativeStateEnvelope>, JournalError>
Returns the selected v2 state envelope, if migration has occurred.
Trait Implementations§
Source§impl JournalBackend for HostDirJournalBackend
impl JournalBackend for HostDirJournalBackend
fn acquire_lease(&self) -> Result<Lease, JournalError>
fn read_state(&self) -> Result<StoredState, JournalError>
fn admit(&self, admission: Admission) -> Result<JournalHead, JournalError>
Source§fn admit_then(
&self,
admission: Admission,
action: &mut dyn CommitAction,
) -> Result<GuardedAdmission, JournalError>
fn admit_then( &self, admission: Admission, action: &mut dyn CommitAction, ) -> Result<GuardedAdmission, JournalError>
Admits a new batch and invokes a short continuation before releasing
exclusion against every head/fence mutation. Exact redelivery does not
invoke the continuation. Unsupported backends refuse before committing.
Source§fn put_datum(
&self,
object: JournalObject,
) -> Result<StoredDatumRef, JournalError>
fn put_datum( &self, object: JournalObject, ) -> Result<StoredDatumRef, JournalError>
Durably publishes one immutable semantic object without making it a
journal retention root.
Source§fn get_datum(&self, meaning: &ContentId) -> Result<Datum, JournalError>
fn get_datum(&self, meaning: &ContentId) -> Result<Datum, JournalError>
Resolves one semantic object by meaning, returning an owned Datum.
Source§fn rebuild_datum_index(&self) -> Result<Vec<StoredDatumRef>, JournalError>
fn rebuild_datum_index(&self) -> Result<Vec<StoredDatumRef>, JournalError>
Rebuilds and verifies the derived semantic-to-storage correspondence.
Auto Trait Implementations§
impl !RefUnwindSafe for HostDirJournalBackend
impl !UnwindSafe for HostDirJournalBackend
impl Forget for HostDirJournalBackend
impl Freeze for HostDirJournalBackendwhere
*const ArcInner<dyn HostDirPort> is !null: Freeze,
PhantomData<ArcInner<dyn HostDirPort>>: Freeze,
impl Move for HostDirJournalBackend
impl Send for HostDirJournalBackend
impl Sync for HostDirJournalBackend
impl Unpin for HostDirJournalBackend
impl UnsafeUnpin for HostDirJournalBackendwhere
*const ArcInner<dyn HostDirPort> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn HostDirPort>>: UnsafeUnpin,
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