[][src]Struct reactive_state::Listener

pub struct Listener<State, Event>(_);

A weak reference to a callback function (usually Callback) which is notified of changes to Store State, and Events produced by the store.

See Callback for more information about how this is typically used.

Implementations

impl<State, Event> Listener<State, Event>[src]

pub fn as_callback(&self) -> Option<Callback<State, Event>>[src]

Attempt to upgrade the weak reference in this listener to a Callback, otherwise if unable to, returns None.

Trait Implementations

impl<State, Event> AsListener<State, Event> for Listener<State, Event>[src]

impl<State: Clone, Event: Clone> Clone for Listener<State, Event>[src]

Auto Trait Implementations

impl<State, Event> !RefUnwindSafe for Listener<State, Event>

impl<State, Event> !Send for Listener<State, Event>

impl<State, Event> !Sync for Listener<State, Event>

impl<State, Event> Unpin for Listener<State, Event>

impl<State, Event> !UnwindSafe for Listener<State, Event>

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> CloneAny for T where
    T: Clone + Any

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.