Skip to main content

Update

Struct Update 

Source
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>

Source

pub fn new(backend: B) -> Self

Source

pub fn capabilities(&self) -> Capabilities

Source

pub fn state(&self) -> State

Source

pub fn received(&self) -> u64

Source

pub fn into_backend(self) -> B

Source

pub fn begin(&mut self, size: u64, metadata: &[u8]) -> Result<(), Error>

Source

pub fn write(&mut self, bytes: &[u8]) -> Result<usize, Error>

Source

pub fn finish(&mut self) -> Result<(), Error>

Source

pub fn activate(&mut self) -> Result<(), Error>

Source

pub fn abort(&mut self) -> Result<(), Error>

Source

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>
where B: Send, <B as FirmwareBackend>::Verified: Send,

§

impl<B> Sync for Update<B>
where B: Sync, <B as FirmwareBackend>::Verified: Sync,

§

impl<B> Unpin for Update<B>
where B: Unpin, <B as FirmwareBackend>::Verified: Unpin,

§

impl<B> UnsafeUnpin for Update<B>

§

impl<B> UnwindSafe for Update<B>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.