Skip to main content

Ota

Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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§

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§