Crate async_proto[−][src]
This is async-proto
, a library crate facilitating simple binary network protocols with async
support.
The main feature is the Protocol
trait, which allows reading a value of an implementing type from an async or sync stream, as well as writing one to an async or sync sink.
Protocol
can be derived for enum
s and struct
s if all fields implement Protocol
.
Features
The following features can be enabled via Cargo:
blocking
: Adds blockingread_sync
andwrite_sync
methods to theProtocol
trait.serde_json
: Adds a dependency on theserde_json
crate and implementsProtocol
for itsValue
,Map
, andNumber
types.
Modules
impls |
Traits
Protocol | This trait allows reading a value of an implementing type from an async or sync stream, as well as writing one to an async or sync sink. |
Derive Macros
Protocol | Implements the |