Trait Api

Source
pub trait Api: Send {
    type Protocol: Api;
    type Update: Api;

    // Required methods
    fn serial() -> Cow<'static, [u8]>;
    fn version() -> Cow<'static, [u8]>;
    fn reboot() -> Result<!, Error>;
}
Expand description

Platform interface.

Required Associated Types§

Source

type Protocol: Api

Platform protocol interface.

Source

type Update: Api

Platform update interface.

Required Methods§

Source

fn serial() -> Cow<'static, [u8]>

Returns the platform serial.

Source

fn version() -> Cow<'static, [u8]>

Returns the platform version.

Versions are comparable with lexicographical order.

Source

fn reboot() -> Result<!, Error>

Reboots the device (thus platform and applets).

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.

Implementors§