Skip to main content

Module pipe

Module pipe 

Source
Available on crate features transport and transport-pipe 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", b"hello world").await;

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

Structs§

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