Struct frappe::Stream [] [src]

pub struct Stream<T: Clone> { /* fields omitted */ }

A stream of discrete events sent over time.

All the streams returned by the methods below contain an internal reference to it's parent, so dropping intermediate streams won't break the chain.

Methods

impl<T: Clone + 'static> Stream<T>
[src]

Maps this stream into another stream using the provided function.

Creates a new stream that only contains the values where the predicate is true.

Filter and map a stream simultaneously.

Creates a new stream that fires with the events from both streams.

Merges two streams of different types using the provided function.

Reads the values without modifying them.

This is meant to be used as a debugging tool and not to cause side effects.

Creates a channel and sends the stream events through it.

Creates a Signal that holds the last value sent to this stream.

Holds the last value in this stream where the predicate is true.

Accumulates the values sent over this stream.

Maps each stream event to 0..N output values.

The closure must return it's value by sending it through the provided sink. Multiple values (or none) can be sent to the output stream this way.

This primitive is useful to construct asynchronous operations, since you can store the sink for later usage.

impl<T: Clone + 'static> Stream<Option<T>>
[src]

Filters a stream of Option, returning the unwrapped Some values

impl<T: SumType2 + Clone + 'static> Stream<T> where
    T::Type1: Clone + 'static,
    T::Type2: Clone + 'static, 
[src]

Creates a stream with only the first element of a sum type

Creates a stream with only the second element of a sum type

Splits a two element sum type stream into two streams with the unwrapped values

impl<T: Clone + 'static> Stream<Stream<T>>
[src]

Listens to the events from the last stream sent to a nested stream

Trait Implementations

impl<T: Debug + Clone> Debug for Stream<T>
[src]

Formats the value using the given formatter.

impl<T: Clone + Clone> Clone for Stream<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more