embedded_svc::ota

Trait Ota

Source
pub trait Ota: ErrorType {
    type Update<'a>: OtaUpdate<Error = Self::Error>
       where Self: 'a;

    // Required methods
    fn get_boot_slot(&self) -> Result<Slot, Self::Error>;
    fn get_running_slot(&self) -> Result<Slot, Self::Error>;
    fn get_update_slot(&self) -> Result<Slot, Self::Error>;
    fn is_factory_reset_supported(&self) -> Result<bool, Self::Error>;
    fn factory_reset(&mut self) -> Result<(), Self::Error>;
    fn initiate_update(&mut self) -> Result<Self::Update<'_>, Self::Error>;
    fn mark_running_slot_valid(&mut self) -> Result<(), Self::Error>;
    fn mark_running_slot_invalid_and_reboot(&mut self) -> Self::Error;
}

Required Associated Types§

Source

type Update<'a>: OtaUpdate<Error = Self::Error> where Self: 'a

Required Methods§

Source

fn get_boot_slot(&self) -> Result<Slot, Self::Error>

Source

fn get_running_slot(&self) -> Result<Slot, Self::Error>

Source

fn get_update_slot(&self) -> Result<Slot, Self::Error>

Source

fn is_factory_reset_supported(&self) -> Result<bool, Self::Error>

Source

fn factory_reset(&mut self) -> Result<(), Self::Error>

Source

fn initiate_update(&mut self) -> Result<Self::Update<'_>, Self::Error>

Source

fn mark_running_slot_valid(&mut self) -> Result<(), Self::Error>

Source

fn mark_running_slot_invalid_and_reboot(&mut self) -> Self::Error

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<O> Ota for &mut O
where O: Ota,

Source§

type Update<'a> = <O as Ota>::Update<'a> where Self: 'a

Source§

fn get_boot_slot(&self) -> Result<Slot, Self::Error>

Source§

fn get_running_slot(&self) -> Result<Slot, Self::Error>

Source§

fn get_update_slot(&self) -> Result<Slot, Self::Error>

Source§

fn is_factory_reset_supported(&self) -> Result<bool, Self::Error>

Source§

fn factory_reset(&mut self) -> Result<(), Self::Error>

Source§

fn initiate_update(&mut self) -> Result<Self::Update<'_>, Self::Error>

Source§

fn mark_running_slot_valid(&mut self) -> Result<(), Self::Error>

Source§

fn mark_running_slot_invalid_and_reboot(&mut self) -> Self::Error

Implementors§