pub trait Stream:
Debug
+ Send
+ Sync {
// Required methods
fn lane(&self, sink: &SinkName) -> Result<Lane>;
fn requests(&self) -> Result<RequestLane>;
fn watermark(&self) -> Option<Position>;
fn is_idle(&self) -> bool;
}Expand description
The stream port: one lane per sink downward, one request lane upward, and the watermark that ties every lane’s acknowledgements together.
lane and requests are idempotent: calling them again returns fresh ends
over the same lane, which is how the daemon re-attaches a restarted engine
(the previous consumer’s unacknowledged item is redelivered to the new one).
Required Methods§
Sourcefn lane(&self, sink: &SinkName) -> Result<Lane>
fn lane(&self, sink: &SinkName) -> Result<Lane>
The lane for sink. An unknown sink is an error: the set of lanes is
fixed when the stream is built.
Sourcefn requests(&self) -> Result<RequestLane>
fn requests(&self) -> Result<RequestLane>
The request lane.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".