Trait embedded_svc::ota::asynch::Ota

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

    // Required methods
    async fn get_boot_slot(&self) -> Result<Slot, Self::Error>;
    async fn get_running_slot(&self) -> Result<Slot, Self::Error>;
    async fn get_update_slot(&self) -> Result<Slot, Self::Error>;
    async fn is_factory_reset_supported(&self) -> Result<bool, Self::Error>;
    async fn factory_reset(&mut self) -> Result<(), Self::Error>;
    async fn initiate_update(&mut self) -> Result<Self::Update<'_>, Self::Error>;
    async fn mark_running_slot_valid(&mut self) -> Result<(), Self::Error>;
    async 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

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Implementors§