pub trait Api: Send {
type Install: Api;
// Required method
unsafe fn get() -> Result<&'static [u8], Error>;
// Provided methods
fn notify_start() { ... }
fn notify_exit(status: ExitStatus) { ... }
}
Expand description
Applet interface.
Required Associated Types§
Sourcetype Install: Api
type Install: Api
Installs or uninstalls an applet.
An empty transfer uninstalls the applet (because valid applets are not empty). A non-empty transfer installs the transferred applet.
Calling start(true)
will uninstall the current applet if any. It is always possible to
call start()
, in which case a new transfer process is started.
Until finish()
is called, there should be no installed applet. In particular, if the
platform reboots and get()
is called, the returned slice should be empty.
Required Methods§
Provided Methods§
Sourcefn notify_start()
fn notify_start()
Notifies an applet start.
Sourcefn notify_exit(status: ExitStatus)
fn notify_exit(status: ExitStatus)
Notifies an applet exit.
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.