Enum kernel::process_binary::ProcessBinaryError

source ·
pub enum ProcessBinaryError {
    TbfHeaderNotFound,
    TbfHeaderParseFailure(TbfParseError),
    NotEnoughFlash,
    IncompatibleKernelVersion {
        version: Option<(u16, u16)>,
    },
    IncorrectFlashAddress {
        actual_address: u32,
        expected_address: u32,
    },
    NotEnabledProcess,
    Padding,
}
Expand description

Errors resulting from trying to load a process binary structure from flash.

Variants§

§

TbfHeaderNotFound

No TBF header was found.

§

TbfHeaderParseFailure(TbfParseError)

The TBF header for the process could not be successfully parsed.

§

NotEnoughFlash

Not enough flash remaining to parse a process and its header.

§

IncompatibleKernelVersion

A process requires a newer version of the kernel or did not specify a required version. Processes can include the KernelVersion TBF header stating their compatible kernel version (^major.minor).

Boards may not require processes to include the KernelVersion TBF header, and the kernel supports ignoring a missing KernelVersion TBF header. In that case, this error will not be returned for a process missing a KernelVersion TBF header.

version is the (major, minor) kernel version the process indicates it requires. If version is None then the process did not include the KernelVersion TBF header.

Fields

§version: Option<(u16, u16)>
§

IncorrectFlashAddress

A process specified that its binary must start at a particular address, and that is not the address the binary is actually placed at.

Fields

§actual_address: u32
§expected_address: u32
§

NotEnabledProcess

The process binary specifies the process is not enabled, and therefore cannot be loaded.

§

Padding

This entry in flash is just padding.

Trait Implementations§

source§

impl Debug for ProcessBinaryError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<TbfParseError> for ProcessBinaryError

source§

fn from(error: TbfParseError) -> Self

Convert between a TBF Header parse error and a process binary error.

We note that the process binary error is because a TBF header failed to parse, and just pass through the parse error.

Auto Trait Implementations§

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

§

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

§

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.