Skip to main content

StreamGraphFanout

Struct StreamGraphFanout 

Source
pub struct StreamGraphFanout {
    pub max_inputs: usize,
    pub record_domain_size: u64,
    pub left_queue: Buffer<u64>,
    pub right_queue: Buffer<u64>,
    pub ingested: Counter,
    pub left_emitted: Counter,
    pub right_emitted: Counter,
}
Expand description

Retained verification profile for a source fanning out to two FIFO sinks.

Fields§

§max_inputs: usize

Maximum records admitted by the source.

§record_domain_size: u64

Exclusive upper bound of record values.

§left_queue: Buffer<u64>

Left-branch FIFO owner.

§right_queue: Buffer<u64>

Right-branch FIFO owner.

§ingested: Counter

Source-admission counter.

§left_emitted: Counter

Left-sink emission counter.

§right_emitted: Counter

Right-sink emission counter.

Implementations§

Source§

impl StreamGraphFanout

Source

pub fn valid_config(capacity: usize, record_domain_size: u64) -> bool

Test whether the shared queue capacity and value domain are valid.

Source

pub fn new( capacity: usize, max_inputs: usize, record_domain_size: u64, ) -> StreamGraphFanout

Construct an empty valid fan-out execution.

Source

pub fn source_ingest(&mut self, value: u64) -> bool

Replicate one source record into both branch queues.

Source

pub fn consume_left(&mut self) -> bool

Consume one record from the left FIFO branch.

Source

pub fn consume_right(&mut self) -> bool

Consume one record from the right FIFO branch.

Source

pub fn terminal(&self) -> bool

Whether bounded input was admitted and both branches are drained.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.