Struct embedded_update::device::Simulator
source · [−]pub struct Simulator { /* private fields */ }
Expand description
A simulated device which implements the FirmwareDevice
trait.
Implementations
Trait Implementations
sourceimpl FirmwareDevice for Simulator
impl FirmwareDevice for Simulator
type Error = Infallible
type Error = Infallible
The error type.
type StatusFuture<'m>
where
Self: 'm = impl Future<Output = Result<FirmwareStatus<<Simulator as FirmwareDevice>::Version>, <Simulator as FirmwareDevice>::Error>> + 'm
type StatusFuture<'m>
where
Self: 'm = impl Future<Output = Result<FirmwareStatus<<Simulator as FirmwareDevice>::Version>, <Simulator as FirmwareDevice>::Error>> + 'm
Future returned by status
sourcefn status(&mut self) -> Self::StatusFuture<'_>
fn status(&mut self) -> Self::StatusFuture<'_>
Return the status of the currently running firmware.
type StartFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Simulator as FirmwareDevice>::Error>> + 'm
type StartFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Simulator as FirmwareDevice>::Error>> + 'm
Future returned by start
sourcefn start<'m>(&'m mut self, _: &'m [u8]) -> Self::StartFuture<'m>
fn start<'m>(&'m mut self, _: &'m [u8]) -> Self::StartFuture<'m>
Prepare for starting the firmware update process.
type WriteFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Simulator as FirmwareDevice>::Error>> + 'm
type WriteFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Simulator as FirmwareDevice>::Error>> + 'm
Future returned by write
sourcefn write<'m>(&'m mut self, _: u32, _: &'m [u8]) -> Self::WriteFuture<'m>
fn write<'m>(&'m mut self, _: u32, _: &'m [u8]) -> Self::WriteFuture<'m>
Write a block of firmware at the expected offset.
type UpdateFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Simulator as FirmwareDevice>::Error>> + 'm
type UpdateFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Simulator as FirmwareDevice>::Error>> + 'm
Future returned by update
sourcefn update<'m>(
&'m mut self,
version: &'m [u8],
_: &'m [u8]
) -> Self::UpdateFuture<'m>
fn update<'m>(
&'m mut self,
version: &'m [u8],
_: &'m [u8]
) -> Self::UpdateFuture<'m>
Finish the firmware write and mark device to be updated
type SyncedFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Simulator as FirmwareDevice>::Error>> + 'm
type SyncedFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Simulator as FirmwareDevice>::Error>> + 'm
Future returned by synced
sourcefn synced(&mut self) -> Self::SyncedFuture<'_>
fn synced(&mut self) -> Self::SyncedFuture<'_>
Mark firmware as being in sync with the expected
Auto Trait Implementations
impl RefUnwindSafe for Simulator
impl Send for Simulator
impl Sync for Simulator
impl Unpin for Simulator
impl UnwindSafe for Simulator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more