[][src]Struct hobo::state::StateSlice

pub struct StateSlice<T> { /* fields omitted */ }

Implementations

impl<T> StateSlice<T>[src]

pub fn new(initial: T) -> Self[src]

pub fn update<'a>(&'a mut self) -> impl DerefMut<Target = T> + 'a[src]

pub fn view(&self) -> &T[src]

pub fn subscribe_key(&self, f: impl FnMut() + 'static) -> SubscriptionKey[src]

#[must_use]pub fn subscribe(&self, f: impl FnMut() + 'static) -> Subscription[src]

pub fn unsubscribe(&self, key: SubscriptionKey)[src]

Trait Implementations

impl<T: Debug> Debug for StateSlice<T>[src]

impl<T: Default> Default for StateSlice<T>[src]

impl<T> Send for StateSlice<T>[src]

impl<T> Sync for StateSlice<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for StateSlice<T>

impl<T> Unpin for StateSlice<T> where
    T: Unpin

impl<T> !UnwindSafe for StateSlice<T>

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, 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.