[][src]Struct streamline::Streamline

pub struct Streamline<C, E, S> where
    S: State<Context = C, Error = E>, 
{ /* fields omitted */ }

Streamlines represent the streams of states configured for a particular Context, Error type, and State-implementing type

Methods

impl<C, E, S> Streamline<C, E, S> where
    S: State<Context = C, Error = E>, 
[src]

pub fn build(state: S) -> Self[src]

Create a Streamline from an initial state

pub fn context(self, context: C) -> Self[src]

Add an (optional) context to an existing Streamline

pub fn run(self) -> impl Stream<Item = Progress<S, E, C>>[src]

Generate a Stream of states, consuming the Streamline

pub fn run_preemptible(self) -> (impl Stream<Item = Progress<S, E, C>>, Cancel)[src]

Return a Stream of states and a cancellation handle

Auto Trait Implementations

impl<C, E, S> !RefUnwindSafe for Streamline<C, E, S>

impl<C, E, S> Send for Streamline<C, E, S> where
    C: Send,
    E: Send + Sync,
    S: Send

impl<C, E, S> Sync for Streamline<C, E, S> where
    C: Sync,
    E: Send + Sync,
    S: Sync

impl<C, E, S> Unpin for Streamline<C, E, S> where
    C: Unpin,
    E: Unpin,
    S: Unpin

impl<C, E, S> !UnwindSafe for Streamline<C, E, S>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.