Enum wasefire_protocol::Api
source · #[non_exhaustive]pub enum Api<'a, T: Direction> {
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>),
}Expand description
Protocol API parametric over the message direction.
Variants gated by the full feature are deprecated. They won’t be used by new devices.
However, to support older devices, the host must be able to use them.
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.
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,
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,
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,
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,
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,
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,
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,
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,
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