[−][src]Trait drone_core::fib::ThrFiberStreamRing
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]
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.
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]
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.
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]
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.
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]
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.