Registry / networking / asynchronous-codec

asynchronous-codec

JSON →
library0.7.0rscratesunverified

Utilities for encoding and decoding frames using async/await, often used with tokio or async-std.

# Cargo.toml [dependencies] asynchronous-codec = "0.7.0"
INSTALL
IMPORT
SIG · ASYNCHRONOUS-CODEC
A
asynchronous-codec
networkingrustv0.7.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Framed
use asynchronous_codec::Framed;

Wraps a TcpStream with a line-based codec for async reading.

use asynchronous_codec::{Framed, LinesCodec}; use tokio::net::TcpStream; async fn handle(stream: TcpStream) { let mut framed = Framed::new(stream, LinesCodec {}); while let Some(Ok(line)) = framed.next().await { println!("Received: {}", line); } }
Debug
Known issues
gotchaRequires an async runtime (e.g., tokio) to be used
fix
Add tokio or async-std as a dependency and run with an async executor.
affects: >= 0.7.0
Upgrade
Version history
0.7.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
48 hits · last 30 days
node
42
Resources
asynchronous-codec — cargo add asynchronous-codec · libregistry