[][src]Struct reducer::AsyncReactor

pub struct AsyncReactor<T, F> { /* fields omitted */ }

An adapter for types that implement Sink to behave as a Reactor (requires async)

Returned by Reactor::from_sink.

Trait Implementations

impl<T: Clone, F: Clone> Clone for AsyncReactor<T, F>[src]

impl<T: Copy, F: Copy> Copy for AsyncReactor<T, F>[src]

impl<T: Debug, F: Debug> Debug for AsyncReactor<T, F>[src]

impl<T: Default, F: Default> Default for AsyncReactor<T, F>[src]

impl<T, F> Deref for AsyncReactor<T, F>[src]

type Target = T

The resulting type after dereferencing.

impl<T, F> DerefMut for AsyncReactor<T, F>[src]

impl<T: Eq, F: Eq> Eq for AsyncReactor<T, F>[src]

impl<T: Hash, F: Hash> Hash for AsyncReactor<T, F>[src]

impl<T: PartialEq, F: PartialEq> PartialEq<AsyncReactor<T, F>> for AsyncReactor<T, F>[src]

impl<T, F> PinnedDrop for AsyncReactor<T, F>[src]

impl<S, T, F, E> Reactor<S> for AsyncReactor<T, F> where
    S: ?Sized,
    Self: for<'s> Sink<&'s S, Error = E> + Unpin
[src]

type Error = E

The reason why the state couldn't be sent through the sink.

fn react(&mut self, state: &S) -> Result<(), Self::Error>[src]

Sends an owned version of the state through the sink.

impl<'_, S, T, F, O> Sink<&'_ S> for AsyncReactor<T, F> where
    S: ?Sized,
    T: Sink<O>,
    F: for<'s> Fn(&'s S) -> O, 
[src]

type Error = T::Error

The type of value produced by the sink when an error occurs.

impl<T, F> StructuralEq for AsyncReactor<T, F>[src]

impl<T, F> StructuralPartialEq for AsyncReactor<T, F>[src]

impl<'pin, T, F> Unpin for AsyncReactor<T, F> where
    __AsyncReactor<'pin, T, F>: Unpin
[src]

impl<T, F> UnsafeUnpin for AsyncReactor<T, F>[src]

Auto Trait Implementations

impl<T, F> RefUnwindSafe for AsyncReactor<T, F> where
    F: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, F> Send for AsyncReactor<T, F> where
    F: Send,
    T: Send

impl<T, F> Sync for AsyncReactor<T, F> where
    F: Sync,
    T: Sync

impl<T, F> UnwindSafe for AsyncReactor<T, F> where
    F: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Item> SinkExt<Item> for T where
    T: Sink<Item> + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.