Available on crate features
blocking or tokio or serial only.Expand description
Optional I/O adapters that wrap the sans-I/O core into convenience APIs.
The crate’s core (session, file_transfer,
codec) does no I/O of its own — callers feed bytes in
and pull events out. These adapter modules lift that core over a real
transport. Each is gated behind its own feature flag so users only pay
for what they use:
blocking(featureblocking) — synchronous loop over anystd::io::Read + std::io::Writetransport.tokio(featuretokio) — async loop over anytokio::io::AsyncRead + AsyncWrite + Unpintransport.serialport(featureserial) — convenience helpers for opening aserialport::SerialPort, which already implementsRead + Writeand so plugs intoblockingdirectly.
Custom transports — TCP-to-serial bridges, USB CDC via rusb, in-memory
pipes for tests — just need to implement those standard traits.
Shared option / result / error types live in common.
Modules§
- blocking
blocking - Synchronous adapter — drives the sans-I/O core over a
Read+Writetransport. - common
blockingortokio - Shared types used by both the
blockingandtokioadapter modules. - serialport
serial - Convenience integration with the
serialportcrate. - tokio
tokio - Tokio async adapter — drives the sans-I/O core over an
AsyncRead+AsyncWritetransport.