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 an applet.
AppletRequest
Sends a request to an applet.
AppletResponse
Reads a response from an applet.
AppletTunnel
Starts a direct tunnel with an applet.
AppletUninstall
Uninstalls an applet.
PlatformInfo
Returns platform information (e.g. serial and version).
PlatformLock
Locks a platform until reboot.
PlatformReboot
Reboots the platform.
PlatformUpdateMetadata
Returns the metadata for platform update.
PlatformUpdateTransfer
Updates the platform.
PlatformVendor
Calls a vendor-specific platform command.
Request

Constants§

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

Traits§

Connectionhost
ConnectionExthost
Service
Service description.

Type Aliases§

DynFuturehost