Generalized errors indicating a range of transport-related issues such as being unable to bind,
disconnections from remote peers, malformed input, etc. Most of these errors are non-fatal
and the server can happily continue serving other customers.
Trait generalizing a common feature of async libraries like tokio where a socket is exposed
as both a stream and a sink. It should be possible even for libraries that have them split
to unify in the bridging layer with this crate.
Generalization of the underlying CoAP transport, intended primarily to make it easy to support a
wide range of protocols (TCP, DTLS, websockets, BLE, etc) but also to eventually support
alternative runtime frameworks such as Embassy for embedded devices.
Parsed CoAP packet coming from a remote peer, as designated by [Endpoint]. Note that
the endpoint is delivered with each packet so that packet-oriented protocols can
avoid the leaky abstraction of a “connection” to a given Endpoint.
Error when receiving from a remote peer. Note that here [Endpoint] is optional as there may
be a generic read error unrelated to any remote peer, for example if the underlying bound
socket is closed.
Error when sending to a remote peer. Note that [Endpoint] is omitted in this case as the
endpoint is provided to the send APIs themselves so we can easily tell which peer generated
the error.