pub trait Api: Send {
type Protocol: Api;
type Update: Api;
// Required methods
fn serial() -> Cow<'static, [u8]>;
fn running_side() -> Side;
fn running_version() -> Cow<'static, [u8]>;
fn opposite_version() -> Result<Cow<'static, [u8]>, Error>;
fn reboot() -> Result<!, Error>;
}
Expand description
Platform interface.
Required Associated Types§
Required Methods§
Sourcefn running_side() -> Side
fn running_side() -> Side
Returns the platform running side.
Sourcefn running_version() -> Cow<'static, [u8]>
fn running_version() -> Cow<'static, [u8]>
Returns the platform running version.
Versions are comparable with lexicographical order.
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.