pub struct StateHistory { /* private fields */ }Expand description
Two committed state blobs. A failed restore of the newest blob selects the previous blob without destroying either copy.
Implementations§
Source§impl StateHistory
impl StateHistory
pub fn new() -> Self
pub fn save(&mut self, blob: Vec<u8>)
pub fn begin_restore(&mut self) -> Option<&[u8]>
pub fn restore_succeeded(&mut self)
pub fn crash_after_restore(&mut self) -> Option<&[u8]>
pub fn current(&self) -> Option<&[u8]>
pub fn previous(&self) -> Option<&[u8]>
Trait Implementations§
Source§impl Clone for StateHistory
impl Clone for StateHistory
Source§impl Debug for StateHistory
impl Debug for StateHistory
Source§impl Default for StateHistory
impl Default for StateHistory
impl Eq for StateHistory
Source§impl PartialEq for StateHistory
impl PartialEq for StateHistory
impl StructuralPartialEq for StateHistory
Auto Trait Implementations§
impl Freeze for StateHistory
impl RefUnwindSafe for StateHistory
impl Send for StateHistory
impl Sync for StateHistory
impl Unpin for StateHistory
impl UnsafeUnpin for StateHistory
impl UnwindSafe for StateHistory
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