Expand description
Definitions of a postcard-rpc Server
The Server role is responsible for accepting endpoint requests, issuing endpoint responses, receiving client topic messages, and sending server topic messages
§Impls
It is intended to allow postcard-rpc servers to be implemented for many different transport types, as well as many different operating environments.
Examples of impls include:
- A no-std impl using embassy and embassy-usb to provide transport over USB
- A std impl using Tokio channels to provide transport for testing
Impls are expected to implement three traits:
Modules§
- impls
- Implementations of various Server traits
Structs§
- Sender
- The
Sender
type wraps aWireTx
impl, and provides higher level functionality over it - Server
- The
Server
is the main interface for handling communication
Enums§
- Server
Error - A type representing the different errors
Server::run()
may return - Wire
RxError Kind - The base
WireRx
Error Kind - Wire
TxError Kind - The base
WireTx
Error Kind
Traits§
- AsWire
RxError Kind - A conversion trait to convert a user error into a base Kind type
- AsWire
TxError Kind - A conversion trait to convert a user error into a base Kind type
- Dispatch
- The dispatch trait handles an incoming endpoint or topic message
- Spawn
Context - A conversion trait for taking the Context and making a SpawnContext
- WireRx
- This trait defines how to receive a single frame from a client
- Wire
Spawn - A trait to assist in spawning a handler task
- WireTx
- This trait defines how the server sends frames to the client
Functions§
- min_
key_ needed - Calculates at const time the minimum number of bytes (1, 2, 4, or 8) to avoid hash collisions in the lists of keys provided.