pub struct LedgerStore {
pub recovered_from_corruption: bool,
/* private fields */
}Fields§
§recovered_from_corruption: boolTrue when stored bytes existed but could not be decoded. The ledger restarts empty, which forces a full zone replay; remote tombstones are replayed with it, so deletions are not lost.
Implementations§
Source§impl LedgerStore
impl LedgerStore
pub fn open(storage: Box<dyn LedgerStorage>) -> SyncResult<Self>
pub fn ledger(&self) -> &Ledger
Sourcepub fn mutate<R>(
&mut self,
change: impl FnOnce(&mut Ledger) -> R,
) -> SyncResult<R>
pub fn mutate<R>( &mut self, change: impl FnOnce(&mut Ledger) -> R, ) -> SyncResult<R>
Mutate then persist; a failed write rolls the in-memory change back.
Auto Trait Implementations§
impl !RefUnwindSafe for LedgerStore
impl !UnwindSafe for LedgerStore
impl Forget for LedgerStore
impl Freeze for LedgerStore
impl Send for LedgerStore
impl Sync for LedgerStore
impl Unpin for LedgerStore
impl UnsafeUnpin for LedgerStore
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