Expand description
§framez
A zerocopy codec for encoding and decoding data in no_std environments.
This crate is based on embedded_io_async’s
Read and Write traits.
It’s recommended to use embedded_io_adapters if you are using other async Read and Write traits like tokio’s AsyncRead and AsyncWrite.
See the examples for more information.
§Features
log: Enables logging usinglog.tracing: Enables logging usingtracing.defmt: Enables logging usingdefmtand implementsdefmt::Formatfor structs and enums.
Modules§
- codec
- A ready to use set of codecs.
- decode
- Decoder trait definition.
- encode
- Encoder trait definition.
- functions
- Utility functions for reading and writing frames.
- state
- Internal states for reading and writing frames.
Macros§
- maybe_
next - Convenience macro to call
maybe_nexton aFramedorFramedRead. - next
- Calls
maybe_next!on aFramedorFramedReadin a loop until a frame is returned or an error occurs. - send
- Convenience macro to call
sendon aFramedorFramedWrite.
Structs§
- Framed
- A framer that reads bytes from a
Readsource and decodes them into frames using aDecoder. And a sink that writes encoded frames into an underlyingWritesink using anEncoder. - Framed
Read - A framer that reads bytes from a
Readsource and decodes them into frames using aDecoder. - Framed
Write - A sink that writes encoded frames into an underlying
Writesink using anEncoder.
Enums§
- Read
Error - An error that can occur while reading a frame.
- Write
Error - An error that can occur while writing a frame.