pub struct Update<B: FirmwareBackend> { /* private fields */ }Expand description
Exclusive ownership prevents a second writer between verification/activation. Device adapters must also make opening/duplication exclusive. Dropping or recovering the backend never invokes activation. Backends reconstruct boot state themselves; this RAM state describes only the current stream.
Implementations§
Source§impl<B: FirmwareBackend> Update<B>
impl<B: FirmwareBackend> Update<B>
pub fn new(backend: B) -> Self
pub fn capabilities(&self) -> Capabilities
pub fn state(&self) -> State
pub fn received(&self) -> u64
pub fn into_backend(self) -> B
pub fn begin(&mut self, size: u64, metadata: &[u8]) -> Result<(), Error>
pub fn write(&mut self, bytes: &[u8]) -> Result<usize, Error>
pub fn finish(&mut self) -> Result<(), Error>
pub fn activate(&mut self) -> Result<(), Error>
pub fn abort(&mut self) -> Result<(), Error>
pub fn confirm_running(&mut self) -> Result<(), Error>
Auto Trait Implementations§
impl<B> Freeze for Update<B>
impl<B> RefUnwindSafe for Update<B>
impl<B> Send for Update<B>
impl<B> Sync for Update<B>
impl<B> Unpin for Update<B>
impl<B> UnsafeUnpin for Update<B>
impl<B> UnwindSafe for Update<B>
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