pub enum Error<E> {
Bundle(Error),
Storage(Error<E>),
VerifyFailed,
}Expand description
Why an install was refused or failed.
Generic over the device error, unlike bundle::Error, which is why the
two are separate types: a host that only ever builds bundles would
otherwise have to name a block-device error it does not have.
Variants§
Bundle(Error)
The bundle was rejected before anything was written.
Storage(Error<E>)
The card or the filesystem failed.
VerifyFailed
A file read back after writing did not match what was written.
Implementations§
Source§impl<E> Error<E>
impl<E> Error<E>
Sourcepub fn http_status(&self) -> u16
pub fn http_status(&self) -> u16
The HTTP status to answer this with, for a device that took the bundle over HTTP.
A rejected bundle is the sender’s fault and a card that failed mid-write is not, and answering the same to both sends whoever is updating to look at the wrong thing.
Trait Implementations§
Source§impl<E: Debug> Error for Error<E>
impl<E: Debug> Error for Error<E>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl<E> Freeze for Error<E>
impl<E> RefUnwindSafe for Error<E>where
Error<E>: RefUnwindSafe,
impl<E> Send for Error<E>
impl<E> Sync for Error<E>
impl<E> Unpin for Error<E>
impl<E> UnsafeUnpin for Error<E>where
Error<E>: UnsafeUnpin,
impl<E> UnwindSafe for Error<E>where
Error<E>: UnwindSafe,
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