[−][src]Struct market::Collector
Implementations
impl<G, T> Collector<G, T> where
T: 'static,
[src]
T: 'static,
#[must_use]pub fn new() -> Self
[src]
Creates a new, empty Collector
.
pub fn push<C>(&mut self, consumer: Rc<C>) where
C: Consumer + 'static,
G: From<C::Good> + 'static,
T: From<C::Fault> + Error + 'static,
[src]
C: Consumer + 'static,
G: From<C::Good> + 'static,
T: From<C::Fault> + Error + 'static,
Adds consumer
to the end of the Consumer
s held by self
.
Trait Implementations
impl<G, T> Consumer for Collector<G, T> where
T: Error + 'static,
[src]
T: Error + 'static,
type Good = G
The item being consumed.
type Fault = T
The fault that could be thrown during consumption.
fn consume(&self) -> Result<Self::Good, ConsumeFailure<Self::Fault>>
[src]
fn consume_all(&self) -> Result<Vec<Self::Good>, Self::Fault>
[src]
fn demand(&self) -> Result<Self::Good, Self::Fault>
[src]
impl<G, E> Debug for Collector<G, E>
[src]
impl<G: Default, T: Default> Default for Collector<G, T>
[src]
Auto Trait Implementations
impl<G, T> !RefUnwindSafe for Collector<G, T>
impl<G, T> !Send for Collector<G, T>
impl<G, T> !Sync for Collector<G, T>
impl<G, T> Unpin for Collector<G, T>
impl<G, T> !UnwindSafe for Collector<G, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<N, S> AssembleInto<S> for N where
S: AssembleFrom<N>,
[src]
S: AssembleFrom<N>,
type Error = <S as AssembleFrom<N>>::Error
The type of the error that could be thrown during assembly.
fn assemble_into(
components: &mut Vec<N>
) -> Result<S, AssembleFailure<<N as AssembleInto<S>>::Error>>
[src]
components: &mut Vec<N>
) -> Result<S, AssembleFailure<<N as AssembleInto<S>>::Error>>
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<N, S> DisassembleInto<N> for S where
N: DisassembleFrom<S>,
[src]
N: DisassembleFrom<S>,
type Error = <N as DisassembleFrom<S>>::Error
The type of the error that could be thrown during disassembly.
fn disassemble_into(self) -> Result<Vec<N>, <S as DisassembleInto<N>>::Error>
[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>,