pub struct Saved { /* private fields */ }Expand description
A device’s state as bytes to keep across a loss of power.
It holds the session keys; its Debug form leaves them, and everything else, out.
Implementations§
Source§impl Saved
impl Saved
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Saved, StateError>
pub fn from_bytes(bytes: &[u8]) -> Result<Saved, StateError>
Reads bytes a device saved.
§Arguments
bytes- what was stored.
§Returns
The saved state, checked for length, format and checksum.
§Errors
Returns StateError::Length, StateError::Corrupt or StateError::Format.
Trait Implementations§
impl Copy for Saved
impl Eq for Saved
impl StructuralPartialEq for Saved
Auto Trait Implementations§
impl Freeze for Saved
impl RefUnwindSafe for Saved
impl Send for Saved
impl Sync for Saved
impl Unpin for Saved
impl UnsafeUnpin for Saved
impl UnwindSafe for Saved
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