pub struct StreamGraph {
pub chain_length: usize,
pub max_inputs: usize,
pub record_domain_size: u64,
pub q1: Buffer<u64>,
pub q2: Buffer<u64>,
pub q3: Buffer<u64>,
pub ingested: Counter,
pub emitted: Counter,
}Expand description
Bounded linear stream owner.
Fields§
§chain_length: usizeNumber of stages in the linear chain.
max_inputs: usizeMaximum records admitted at the source.
record_domain_size: u64Exclusive upper bound of record values.
q1: Buffer<u64>First FIFO edge owner.
q2: Buffer<u64>Second FIFO edge owner.
q3: Buffer<u64>Optional third FIFO edge owner.
ingested: CounterSource-admission counter.
emitted: CounterSink-emission counter.
Implementations§
Source§impl StreamGraph
impl StreamGraph
Sourcepub fn valid_config(
chain_length: usize,
capacity: usize,
record_domain_size: u64,
) -> bool
pub fn valid_config( chain_length: usize, capacity: usize, record_domain_size: u64, ) -> bool
Test whether a chain configuration is represented by this carrier.
Sourcepub fn new(
chain_length: usize,
capacity: usize,
max_inputs: usize,
record_domain_size: u64,
) -> StreamGraph
pub fn new( chain_length: usize, capacity: usize, max_inputs: usize, record_domain_size: u64, ) -> StreamGraph
Construct an empty valid stream graph.
Sourcepub fn source_ingest(&mut self, value: u64) -> bool
pub fn source_ingest(&mut self, value: u64) -> bool
Admit one in-domain record when source and backpressure bounds permit it.
Sourcepub fn middle2_fire(&mut self) -> bool
pub fn middle2_fire(&mut self) -> bool
Transfer the oldest first-edge record to the second edge.
Sourcepub fn middle3_fire(&mut self) -> bool
pub fn middle3_fire(&mut self) -> bool
Transfer the oldest second-edge record through the optional fourth stage.
Sourcepub fn sink_consume(&mut self) -> bool
pub fn sink_consume(&mut self) -> bool
Consume the oldest record from the final edge.
Sourcepub fn done_stuttering(&mut self) -> bool
pub fn done_stuttering(&mut self) -> bool
Execute the terminal stutter after bounded input is drained.
Auto Trait Implementations§
impl Freeze for StreamGraph
impl RefUnwindSafe for StreamGraph
impl Send for StreamGraph
impl Sync for StreamGraph
impl Unpin for StreamGraph
impl UnsafeUnpin for StreamGraph
impl UnwindSafe for StreamGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more