Skip to main content

Pipeline

Struct Pipeline 

Source
pub struct Pipeline { /* private fields */ }
Expand description

A built graph, ready to take samples and run.

Implementations§

Source§

impl Pipeline

Source

pub fn sources(&self) -> impl Iterator<Item = (SourceId, &str, TimeBase)>

The names and time bases of the sources, in id order.

Source

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.

Source

pub fn next_tick(&self, source: SourceId) -> Option<Tick>

The tick source expects next; None before its first item, which may start anywhere.

Source

pub fn has_room(&self, source: SourceId) -> bool

Whether source has room for another item.

Source

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.

Source

pub fn is_finished(&self) -> bool

Whether every node has finished: their inputs ended and they wrote all they had.

Source

pub fn stats(&self) -> Stats

The state of every queue.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Debug for Pipeline

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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, !>

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.