[−][src]Struct market::Collector
Implementations
impl<G, E> Collector<G, E>
[src]
#[must_use]pub fn new() -> Self
[src]
Creates a new, empty Collector
.
pub fn convert_into_and_push<C>(&mut self, consumer: C) where
C: Consumer + 'static,
G: From<C::Good> + 'static,
E: From<C::Failure> + Error + 'static,
[src]
C: Consumer + 'static,
G: From<C::Good> + 'static,
E: From<C::Failure> + Error + 'static,
Converts consumer
to an appropriate type then pushes it.
pub fn push<C>(&mut self, consumer: C) where
C: Consumer<Good = G, Failure = E> + 'static,
E: Error,
[src]
C: Consumer<Good = G, Failure = E> + 'static,
E: Error,
Adds consumer
to the end of the Consumer
s held by self
.
Trait Implementations
impl<G, E> Consumer for Collector<G, E> where
E: Error,
[src]
E: Error,
type Good = G
The type of the item being consumed.
type Failure = E
The type of the error that could be thrown during consumption.
fn consume(&self) -> Result<Self::Good, ConsumeError<Self::Failure>>
[src]
fn consume_all(&self) -> Result<Vec<Self::Good>, ConsumeError<Self::Failure>>
[src]
fn demand(&self) -> Result<Self::Good, Self::Failure>
[src]
fn adapt<G, F>(self) -> Adapter<Self, G, F> where
Self: Sized,
[src]
Self: Sized,
impl<G, E> Debug for Collector<G, E>
[src]
impl<G: Default, E: Default> Default for Collector<G, E>
[src]
Auto Trait Implementations
impl<G, E> !RefUnwindSafe for Collector<G, E>
impl<G, E> !Send for Collector<G, E>
impl<G, E> !Sync for Collector<G, E>
impl<G, E> Unpin for Collector<G, E>
impl<G, E> !UnwindSafe for Collector<G, E>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,