#[non_exhaustive]pub enum Api<'a, T: Direction> {
Show 13 variants
ApiVersion(T::Type<'a, ApiVersion>),
AppletRequest(T::Type<'a, AppletRequest>),
AppletResponse(T::Type<'a, AppletResponse>),
PlatformReboot(T::Type<'a, PlatformReboot>),
AppletTunnel(T::Type<'a, AppletTunnel>),
PlatformInfo(T::Type<'a, PlatformInfo>),
PlatformVendor(T::Type<'a, PlatformVendor>),
PlatformUpdateMetadata(T::Type<'a, PlatformUpdateMetadata>),
PlatformUpdateTransfer(T::Type<'a, PlatformUpdateTransfer>),
AppletInstall(T::Type<'a, AppletInstall>),
AppletUninstall(T::Type<'a, AppletUninstall>),
AppletExitStatus(T::Type<'a, AppletExitStatus>),
PlatformLock(T::Type<'a, PlatformLock>),
}Expand description
Protocol API parametric over the message direction.
Deprecated variants are only available to the host (to support older devices).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ApiVersion(T::Type<'a, ApiVersion>)
Returns the device API version.
AppletRequest(T::Type<'a, AppletRequest>)
Sends a request to an applet.
AppletResponse(T::Type<'a, AppletResponse>)
Reads a response from an applet.
PlatformReboot(T::Type<'a, PlatformReboot>)
Reboots the platform.
AppletTunnel(T::Type<'a, AppletTunnel>)
Starts a direct tunnel with an applet.
PlatformInfo(T::Type<'a, PlatformInfo>)
Returns platform information (e.g. serial and version).
PlatformVendor(T::Type<'a, PlatformVendor>)
Calls a vendor-specific platform command.
PlatformUpdateMetadata(T::Type<'a, PlatformUpdateMetadata>)
Returns the metadata for platform update.
PlatformUpdateTransfer(T::Type<'a, PlatformUpdateTransfer>)
Updates the platform.
AppletInstall(T::Type<'a, AppletInstall>)
Installs an applet.
AppletUninstall(T::Type<'a, AppletUninstall>)
Uninstalls an applet.
AppletExitStatus(T::Type<'a, AppletExitStatus>)
Returns the exit status of an applet, if not running.
PlatformLock(T::Type<'a, PlatformLock>)
Locks a platform until reboot.
This is useful for testing purposes by locking a platform before flashing a new one.
Implementations§
Trait Implementations§
Source§impl<'a, T: Debug + Direction> Debug for Api<'a, T>where
T::Type<'a, ApiVersion>: Debug,
T::Type<'a, AppletRequest>: Debug,
T::Type<'a, AppletResponse>: Debug,
T::Type<'a, PlatformReboot>: Debug,
T::Type<'a, AppletTunnel>: Debug,
T::Type<'a, PlatformInfo>: Debug,
T::Type<'a, PlatformVendor>: Debug,
T::Type<'a, PlatformUpdateMetadata>: Debug,
T::Type<'a, PlatformUpdateTransfer>: Debug,
T::Type<'a, AppletInstall>: Debug,
T::Type<'a, AppletUninstall>: Debug,
T::Type<'a, AppletExitStatus>: Debug,
T::Type<'a, PlatformLock>: Debug,
impl<'a, T: Debug + Direction> Debug for Api<'a, T>where
T::Type<'a, ApiVersion>: Debug,
T::Type<'a, AppletRequest>: Debug,
T::Type<'a, AppletResponse>: Debug,
T::Type<'a, PlatformReboot>: Debug,
T::Type<'a, AppletTunnel>: Debug,
T::Type<'a, PlatformInfo>: Debug,
T::Type<'a, PlatformVendor>: Debug,
T::Type<'a, PlatformUpdateMetadata>: Debug,
T::Type<'a, PlatformUpdateTransfer>: Debug,
T::Type<'a, AppletInstall>: Debug,
T::Type<'a, AppletUninstall>: Debug,
T::Type<'a, AppletExitStatus>: Debug,
T::Type<'a, PlatformLock>: Debug,
Auto Trait Implementations§
impl<'a, T> Freeze for Api<'a, T>where
<T as Direction>::Type<'a, ApiVersion>: Freeze,
<T as Direction>::Type<'a, AppletRequest>: Freeze,
<T as Direction>::Type<'a, AppletResponse>: Freeze,
<T as Direction>::Type<'a, PlatformReboot>: Freeze,
<T as Direction>::Type<'a, AppletTunnel>: Freeze,
<T as Direction>::Type<'a, PlatformInfo>: Freeze,
<T as Direction>::Type<'a, PlatformVendor>: Freeze,
<T as Direction>::Type<'a, PlatformUpdateMetadata>: Freeze,
<T as Direction>::Type<'a, PlatformUpdateTransfer>: Freeze,
<T as Direction>::Type<'a, AppletInstall>: Freeze,
<T as Direction>::Type<'a, AppletUninstall>: Freeze,
<T as Direction>::Type<'a, AppletExitStatus>: Freeze,
<T as Direction>::Type<'a, PlatformLock>: Freeze,
impl<'a, T> RefUnwindSafe for Api<'a, T>where
<T as Direction>::Type<'a, ApiVersion>: RefUnwindSafe,
<T as Direction>::Type<'a, AppletRequest>: RefUnwindSafe,
<T as Direction>::Type<'a, AppletResponse>: RefUnwindSafe,
<T as Direction>::Type<'a, PlatformReboot>: RefUnwindSafe,
<T as Direction>::Type<'a, AppletTunnel>: RefUnwindSafe,
<T as Direction>::Type<'a, PlatformInfo>: RefUnwindSafe,
<T as Direction>::Type<'a, PlatformVendor>: RefUnwindSafe,
<T as Direction>::Type<'a, PlatformUpdateMetadata>: RefUnwindSafe,
<T as Direction>::Type<'a, PlatformUpdateTransfer>: RefUnwindSafe,
<T as Direction>::Type<'a, AppletInstall>: RefUnwindSafe,
<T as Direction>::Type<'a, AppletUninstall>: RefUnwindSafe,
<T as Direction>::Type<'a, AppletExitStatus>: RefUnwindSafe,
<T as Direction>::Type<'a, PlatformLock>: RefUnwindSafe,
impl<'a, T> Send for Api<'a, T>where
<T as Direction>::Type<'a, ApiVersion>: Send,
<T as Direction>::Type<'a, AppletRequest>: Send,
<T as Direction>::Type<'a, AppletResponse>: Send,
<T as Direction>::Type<'a, PlatformReboot>: Send,
<T as Direction>::Type<'a, AppletTunnel>: Send,
<T as Direction>::Type<'a, PlatformInfo>: Send,
<T as Direction>::Type<'a, PlatformVendor>: Send,
<T as Direction>::Type<'a, PlatformUpdateMetadata>: Send,
<T as Direction>::Type<'a, PlatformUpdateTransfer>: Send,
<T as Direction>::Type<'a, AppletInstall>: Send,
<T as Direction>::Type<'a, AppletUninstall>: Send,
<T as Direction>::Type<'a, AppletExitStatus>: Send,
<T as Direction>::Type<'a, PlatformLock>: Send,
impl<'a, T> Sync for Api<'a, T>where
<T as Direction>::Type<'a, ApiVersion>: Sync,
<T as Direction>::Type<'a, AppletRequest>: Sync,
<T as Direction>::Type<'a, AppletResponse>: Sync,
<T as Direction>::Type<'a, PlatformReboot>: Sync,
<T as Direction>::Type<'a, AppletTunnel>: Sync,
<T as Direction>::Type<'a, PlatformInfo>: Sync,
<T as Direction>::Type<'a, PlatformVendor>: Sync,
<T as Direction>::Type<'a, PlatformUpdateMetadata>: Sync,
<T as Direction>::Type<'a, PlatformUpdateTransfer>: Sync,
<T as Direction>::Type<'a, AppletInstall>: Sync,
<T as Direction>::Type<'a, AppletUninstall>: Sync,
<T as Direction>::Type<'a, AppletExitStatus>: Sync,
<T as Direction>::Type<'a, PlatformLock>: Sync,
impl<'a, T> Unpin for Api<'a, T>where
<T as Direction>::Type<'a, ApiVersion>: Unpin,
<T as Direction>::Type<'a, AppletRequest>: Unpin,
<T as Direction>::Type<'a, AppletResponse>: Unpin,
<T as Direction>::Type<'a, PlatformReboot>: Unpin,
<T as Direction>::Type<'a, AppletTunnel>: Unpin,
<T as Direction>::Type<'a, PlatformInfo>: Unpin,
<T as Direction>::Type<'a, PlatformVendor>: Unpin,
<T as Direction>::Type<'a, PlatformUpdateMetadata>: Unpin,
<T as Direction>::Type<'a, PlatformUpdateTransfer>: Unpin,
<T as Direction>::Type<'a, AppletInstall>: Unpin,
<T as Direction>::Type<'a, AppletUninstall>: Unpin,
<T as Direction>::Type<'a, AppletExitStatus>: Unpin,
<T as Direction>::Type<'a, PlatformLock>: Unpin,
impl<'a, T> UnwindSafe for Api<'a, T>where
<T as Direction>::Type<'a, ApiVersion>: UnwindSafe,
<T as Direction>::Type<'a, AppletRequest>: UnwindSafe,
<T as Direction>::Type<'a, AppletResponse>: UnwindSafe,
<T as Direction>::Type<'a, PlatformReboot>: UnwindSafe,
<T as Direction>::Type<'a, AppletTunnel>: UnwindSafe,
<T as Direction>::Type<'a, PlatformInfo>: UnwindSafe,
<T as Direction>::Type<'a, PlatformVendor>: UnwindSafe,
<T as Direction>::Type<'a, PlatformUpdateMetadata>: UnwindSafe,
<T as Direction>::Type<'a, PlatformUpdateTransfer>: UnwindSafe,
<T as Direction>::Type<'a, AppletInstall>: UnwindSafe,
<T as Direction>::Type<'a, AppletUninstall>: UnwindSafe,
<T as Direction>::Type<'a, AppletExitStatus>: UnwindSafe,
<T as Direction>::Type<'a, PlatformLock>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more