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

pub trait ThrFiberStreamRing: ThrToken {
    fn add_stream_ring_skip<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
, { ... }
fn add_stream_ring_overwrite<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
, { ... }
fn add_stream_ring<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
, { ... }
fn add_try_stream_ring_overwrite<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 add_stream_ring methods.

Provided methods

fn add_stream_ring_skip<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, 

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.

fn add_stream_ring_overwrite<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, 

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.

fn add_stream_ring<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, 

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.

fn add_try_stream_ring_overwrite<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, 

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...