Skip to main content

Platform

Struct Platform 

Source
pub struct Platform<T, S, B, C>
where T: Transport, S: Storage, B: BootMetaStore, C: BootCtl,
{ pub transport: T, pub storage: S, pub boot_meta: B, pub ctl: C, }
Expand description

Concrete platform holding all boot-time peripherals.

Constructed by the board-specific crate and passed to Core::new.

Fields§

§transport: T

UART / RS-485 transport.

§storage: S

Flash storage for reading and writing firmware.

§boot_meta: B

Persistent boot metadata (state, trials, checksum).

§ctl: C

Boot control (reset, boot mode selection).

Implementations§

Source§

impl<T, S, B, C> Platform<T, S, B, C>
where T: Transport, S: Storage, B: BootMetaStore, C: BootCtl,

Source

pub fn new(transport: T, storage: S, boot_meta: B, ctl: C) -> Self

Assemble a platform from its components.

Auto Trait Implementations§

§

impl<T, S, B, C> Freeze for Platform<T, S, B, C>
where T: Freeze, S: Freeze, B: Freeze, C: Freeze,

§

impl<T, S, B, C> RefUnwindSafe for Platform<T, S, B, C>

§

impl<T, S, B, C> Send for Platform<T, S, B, C>
where T: Send, S: Send, B: Send, C: Send,

§

impl<T, S, B, C> Sync for Platform<T, S, B, C>
where T: Sync, S: Sync, B: Sync, C: Sync,

§

impl<T, S, B, C> Unpin for Platform<T, S, B, C>
where T: Unpin, S: Unpin, B: Unpin, C: Unpin,

§

impl<T, S, B, C> UnsafeUnpin for Platform<T, S, B, C>

§

impl<T, S, B, C> UnwindSafe for Platform<T, S, B, C>

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.