Skip to main content

Module pipe

Module pipe 

Source
Available on crate features transport-pipe and transport only.
Expand description

§Pipe Transport

Reads from stdin and writes to stdout for Unix pipeline composition. Newline-delimited: each line is one message.

§Example

use hyperi_rustlib::transport::{PipeTransport, PipeTransportConfig};

let config = PipeTransportConfig::default();
let transport = PipeTransport::new(&config);

// Send writes payload + newline to stdout
transport.send("ignored", bytes::Bytes::from_static(b"hello world")).await;

// Recv reads lines from stdin
let records = transport.recv(10).await?.records;

Structs§

PipeToken
Commit token for pipe transport.
PipeTransport
Unix pipe transport (stdin/stdout).
PipeTransportConfig
Configuration for pipe transport.