pub trait Api: Send {
    type Update: Api;

    // Required methods
    fn version(output: &mut [u8]) -> usize;
    fn reboot() -> Result<!, Error>;
}
Available on crate feature internal-api-platform only.
Expand description

Platform interface.

Required Associated Types§

source

type Update: Api

Available on crate feature api-platform-update only.

Required Methods§

source

fn version(output: &mut [u8]) -> usize

Available on crate feature api-platform only.

Writes the platform version and returns its length in bytes.

Versions are comparable with lexicographical order.

The returned length may be larger than the buffer length, in which case the buffer only contains a prefix of the version. You can use the version_helper() to copy and return appropriately given a full version.

source

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

Available on crate feature api-platform only.

Reboots the device (thus platform and applets).

Object Safety§

This trait is not object safe.

Implementors§