[][src]Trait drone_core::fib::ThrFiberStreamRing

pub trait ThrFiberStreamRing: ThrToken {
    pub fn add_saturating_stream<F, T>(
        self,
        capacity: usize,
        fib: F
    ) -> FiberStreamRing<T>
    where
        F: Fiber<Input = (), Yield = Option<T>, Return = Option<T>>,
        F: Send + 'static,
        T: Send + 'static
, { ... }
pub fn add_overwriting_stream<F, T>(
        self,
        capacity: usize,
        fib: F
    ) -> FiberStreamRing<T>
    where
        F: Fiber<Input = (), Yield = Option<T>, Return = Option<T>>,
        F: Send + 'static,
        T: Send + 'static
, { ... }
pub fn add_try_stream<O, F, T, E>(
        self,
        capacity: usize,
        overflow: O,
        fib: F
    ) -> TryFiberStreamRing<T, E>
    where
        O: Fn(T) -> Result<(), E>,
        F: Fiber<Input = (), Yield = Option<T>, Return = Result<Option<T>, E>>,
        O: Send + 'static,
        F: Send + 'static,
        T: Send + 'static,
        E: Send + 'static
, { ... }
pub fn add_overwriting_try_stream<F, T, E>(
        self,
        capacity: usize,
        fib: F
    ) -> TryFiberStreamRing<T, E>
    where
        F: Fiber<Input = (), Yield = Option<T>, Return = Result<Option<T>, E>>,
        F: Send + 'static,
        T: Send + 'static,
        E: Send + 'static
, { ... } }

Extends ThrToken types with ring stream methods.

Provided methods

pub fn add_saturating_stream<F, T>(
    self,
    capacity: usize,
    fib: F
) -> FiberStreamRing<T> where
    F: Fiber<Input = (), Yield = Option<T>, Return = Option<T>>,
    F: Send + 'static,
    T: Send + 'static, 
[src]

Adds the fiber fib to the fiber chain and returns a stream of T yielded from the fiber.

When the underlying ring buffer overflows, new items will be skipped.

pub fn add_overwriting_stream<F, T>(
    self,
    capacity: usize,
    fib: F
) -> FiberStreamRing<T> where
    F: Fiber<Input = (), Yield = Option<T>, Return = Option<T>>,
    F: Send + 'static,
    T: Send + 'static, 
[src]

Adds the fiber fib to the fiber chain and returns a stream of T yielded from the fiber.

When the underlying ring buffer overflows, new items will overwrite existing ones.

pub fn add_try_stream<O, F, T, E>(
    self,
    capacity: usize,
    overflow: O,
    fib: F
) -> TryFiberStreamRing<T, E> where
    O: Fn(T) -> Result<(), E>,
    F: Fiber<Input = (), Yield = Option<T>, Return = Result<Option<T>, E>>,
    O: Send + 'static,
    F: Send + 'static,
    T: Send + 'static,
    E: Send + 'static, 
[src]

Adds the fiber fib to the fiber chain and returns a stream of Result<T, E> yielded from the fiber.

When the underlying ring buffer overflows, new items will be skipped.

pub fn add_overwriting_try_stream<F, T, E>(
    self,
    capacity: usize,
    fib: F
) -> TryFiberStreamRing<T, E> where
    F: Fiber<Input = (), Yield = Option<T>, Return = Result<Option<T>, E>>,
    F: Send + 'static,
    T: Send + 'static,
    E: Send + 'static, 
[src]

Adds the fiber fib to the fiber chain and returns a stream of Result<T, E> yielded from the fiber.

When the underlying ring buffer overflows, new items will overwrite existing ones.

Loading content...

Implementors

impl<T: ThrToken> ThrFiberStreamRing for T[src]

Loading content...