Expand description
§A simple no-std/no-alloc I/O and parsing crate
The main two traits for parsing are Read
and Write
, implemented by
Reader
, which reads from a fixed-size slice
of bytes, and
Writer
, which writes to a fixed-size slice
of bytes. The Read
and Write
traits are designed to be extended with extension traits,
using traitful::extend
.
Extension traits for big-endian an little-endian parsing are provided in
this crate as well; be::Read
, be::Write
, le::Read
,
le::Write
. When importing a Read
or Write
extension trait, using
as _
will avoid namespace conflicts.
§Synchronous and Asynchronous
The Read
and Write
traits are synchronous by design. This makes it
simple to read and write on in-memory data without touching I/O. For I/O
bound reading and writing, there are the io::Source
and
io::Destination
traits which work by buffering the bytes to be sent on
an io::Sender
or received on an io::Receiver
.
§Features
Some non-default features can enable unstable (no API stability guarantees) functionality.
Modules§
- be
- Big endian parsing
- class
- Classifications of primitive types
- error
- Error types
- io
unstable-io
feature required; I/O primitives (MSRV 1.84)- le
- Little endian parsing
- result
Result
type aliases
Structs§
- Empty
- Reader that is always at EOF
- Purge
- Writer that moves data into the void
- Reader
Read
er that reads from aslice
of bytes- Writer
Write
r that writes to aslice
of bytes