pub struct Pipeline { /* private fields */ }Expand description
A built graph, ready to take samples and run.
Implementations§
Source§impl Pipeline
impl Pipeline
Sourcepub fn sources(&self) -> impl Iterator<Item = (SourceId, &str, TimeBase)>
pub fn sources(&self) -> impl Iterator<Item = (SourceId, &str, TimeBase)>
The names and time bases of the sources, in id order.
Sourcepub fn push(
&mut self,
source: SourceId,
item: SignalItem,
) -> Result<(), PushError>
pub fn push( &mut self, source: SourceId, item: SignalItem, ) -> Result<(), PushError>
Feeds item to source. The first item decides where the stream starts, and a
progress item at that tick goes ahead of it so that readers know nothing came before;
after it, blocks must follow each other or a gap without a hole. The item is handed
back when the source is full.
Sourcepub fn next_tick(&self, source: SourceId) -> Option<Tick>
pub fn next_tick(&self, source: SourceId) -> Option<Tick>
The tick source expects next; None before its first item, which may start
anywhere.
Sourcepub fn run(&mut self) -> RunReport
pub fn run(&mut self) -> RunReport
Polls the nodes, in order, until none of them can go on: every unfinished node waits for input that has not arrived or for an output the caller has not read.
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Whether every node has finished: their inputs ended and they wrote all they had.
Sourcepub fn exposed<T: 'static>(
&mut self,
exposed: ExposedRef<T>,
) -> Option<Exposed<T>>
pub fn exposed<T: 'static>( &mut self, exposed: ExposedRef<T>, ) -> Option<Exposed<T>>
Takes the reader of an exposed output; None once taken.
§Panics
When T is not the output’s event type, which a typed ExposedRef rules out.
Sourcepub fn exposed_dyn<T: 'static>(
&mut self,
exposed: DynExposedRef,
) -> Option<Exposed<T>>
pub fn exposed_dyn<T: 'static>( &mut self, exposed: DynExposedRef, ) -> Option<Exposed<T>>
Takes the reader of an output exposed by name, as T events; None once taken or when
the output carries another event type, which a caller working from a description finds
out this way.