pub trait OutboundPipeline<W> {
// Required methods
fn write(&self, msg: W);
fn close(&self);
}Expand description
Pipeline traits for inbound and outbound message processing Outbound operations for a pipeline.
The OutboundPipeline trait defines operations for pushing data from the
application into the pipeline (toward the network/transport).
These methods are typically called by your application when you want to:
- Send data over the network
- Close the connection
§Type Parameters
R: The input message type (bottom of pipeline)W: The write message type (top of pipeline, from application)
§Example
use sansio::{Pipeline, OutboundPipeline};
let pipeline: Pipeline<Vec<u8>, String> = Pipeline::new();
// ... add handlers ...
let pipeline = pipeline.finalize();
// Send data from application
pipeline.write("Hello, World!".to_string());
pipeline.close();