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

pub trait ThrFiberStreamRing: ThrToken {
    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
, { ... }
fn add_saturating_stream_factory<C, F, T>(
        self,
        capacity: usize,
        factory: C
    ) -> FiberStreamRing<T>
    where
        C: FnOnce() -> F + Send + 'static,
        F: Fiber<Input = (), Yield = Option<T>, Return = Option<T>>,
        F: 'static,
        T: Send + 'static
, { ... }
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
, { ... }
fn add_overwriting_stream_factory<C, F, T>(
        self,
        capacity: usize,
        factory: C
    ) -> FiberStreamRing<T>
    where
        C: FnOnce() -> F + Send + 'static,
        F: Fiber<Input = (), Yield = Option<T>, Return = Option<T>>,
        F: 'static,
        T: Send + 'static
, { ... }
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
, { ... }
fn add_try_stream_factory<C, O, F, T, E>(
        self,
        capacity: usize,
        overflow: O,
        factory: C
    ) -> TryFiberStreamRing<T, E>
    where
        C: FnOnce() -> F + Send + 'static,
        O: Fn(T) -> Result<(), E>,
        F: Fiber<Input = (), Yield = Option<T>, Return = Result<Option<T>, E>>,
        O: Send + 'static,
        F: 'static,
        T: Send + 'static,
        E: Send + 'static
, { ... }
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
, { ... }
fn add_overwriting_try_stream_factory<C, F, T, E>(
        self,
        capacity: usize,
        factory: C
    ) -> TryFiberStreamRing<T, E>
    where
        C: FnOnce() -> F + Send + 'static,
        F: Fiber<Input = (), Yield = Option<T>, Return = Result<Option<T>, E>>,
        F: 'static,
        T: Send + 'static,
        E: Send + 'static
, { ... } }

Extends ThrToken types with ring stream methods.

Provided methods

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.

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

Adds the fiber returned by factory 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.

This method is useful for non-Send fibers.

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.

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

Adds the fiber returned by factory 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.

This method is useful for non-Send fibers.

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.

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

Adds the fiber returned by factory 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.

This method is useful for non-Send fibers.

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.

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

Adds the fiber returned by factory 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.

This method is useful for non-Send fibers.

Loading content...

Implementors

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

Loading content...