Crate wasefire_protocol

Crate wasefire_protocol 

Source
Expand description

Wasefire platform protocol.

This crate defines a high-level protocol between a host and a device. The host initiates requests and the device responds. Requests and responses use the same Api but with a different type parameter: Api<Request> and Api<Response> respectively. However, while the host sends an Api<Request>, the device responds with an ApiResult<T> where T is the service of the request.

This high-level protocol is eventually wrapped in a lower-level protocol for a given transport, for example USB. The host should provide enough time for the device to respond, but should eventually move on in case no response will ever come, for example when the device is reset before sending the response. Reciprocally, the device should accept a new request from the host and cancel the request it was processing if any.

Modules§

applet
platform
transfer
Protocol to transfer data from the host to the device.

Structs§

Versionshost or _descriptor

Enums§

Api
Protocol API parametric over the message direction.
ApiResult
ApiVersion
Returns the device API version.
AppletExitStatus
Returns the exit status of an applet, if not running.
AppletInstall
Installs or uninstalls an applet.
AppletReboot
Reboots an applet.
AppletRequest
Sends a request to an applet.
AppletResponse
Reads a response from an applet.
AppletTunnel
Starts a direct tunnel with an applet.
PlatformClearStore
Clears the store for the platform and all applets.
PlatformInfo
Returns platform information (serial, version, running side, opposite version, etc).
PlatformLock
Locks a platform until reboot.
PlatformReboot
Reboots the platform.
PlatformUpdate
Updates the platform.
PlatformVendor
Calls a vendor-specific platform command.
Request
_AppletInstall0host
(deprecated) Installs an applet.
_AppletUninstall0host
(deprecated) Uninstalls an applet.
_PlatformInfo0host
(deprecated) Returns platform information (e.g. serial and version).
_PlatformUpdate0host
(deprecated) Updates the platform.
_PlatformUpdateMetadatahost
(deprecated) Returns the metadata for platform update.

Constants§

VERSION
Device API version (or maximum supported device API version for host).

Traits§

Connectionhost
ConnectionExthost
Service
Service description.

Type Aliases§

DynFuturehost