pub struct HostDirJournalBackend { /* private fields */ }Expand description
Crash-durable journal composition over the canonical host-backed Table/Dir port.
state contains both fence and head. Its one compare-exchange is the only
publication linearization point. Objects and entries are immutable leaves.
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. Read operations remain available when write safety is absent.
Sourcepub fn with_failpoint_hook(
self,
hook: impl Fn(Failpoint) -> bool + Send + Sync + 'static,
) -> Self
pub fn with_failpoint_hook( self, hook: impl Fn(Failpoint) -> bool + Send + Sync + 'static, ) -> Self
Installs a deterministic test hook. Returning true simulates process death.
Sourcepub fn capabilities(&self) -> BackendCapabilities
pub fn capabilities(&self) -> BackendCapabilities
Reports the binding evidence used to admit or refuse write mode.
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>
Auto Trait Implementations§
impl !RefUnwindSafe for HostDirJournalBackend
impl !UnwindSafe for HostDirJournalBackend
impl Freeze for HostDirJournalBackend
impl Send for HostDirJournalBackend
impl Sync for HostDirJournalBackend
impl Unpin for HostDirJournalBackend
impl UnsafeUnpin for HostDirJournalBackend
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