Struct StateWithUpdater

Source
pub struct StateWithUpdater<T, U: StateUpdater<T>> {
    pub state: T,
    pub updater: U,
}

Fields§

§state: T§updater: U

Implementations§

Source§

impl<T, U: StateUpdater<T>> StateWithUpdater<T, U>

Source

pub fn new(state: T, updater: U) -> Self

Trait Implementations§

Source§

impl<T: Debug, U: Debug + StateUpdater<T>> Debug for StateWithUpdater<T, U>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, U: StateUpdater<T>> Hook for StateWithUpdater<T, U>

Source§

fn use_hook(self: Pin<&mut Self>) -> <Self as HookValue<'_>>::Value

Source§

impl<T, U: StateUpdater<T>> HookPollNextUpdate for StateWithUpdater<T, U>

Source§

fn poll_next_update(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<bool>

The meaning of the return value is: Read more
Source§

impl<T, U: StateUpdater<T>> HookUnmount for StateWithUpdater<T, U>

Source§

fn unmount(self: Pin<&mut Self>)

Source§

impl<'hook, T, U: StateUpdater<T>> HookValue<'hook> for StateWithUpdater<T, U>

Source§

impl<T, U: StateUpdater<T>> Unpin for StateWithUpdater<T, U>

Auto Trait Implementations§

§

impl<T, U> Freeze for StateWithUpdater<T, U>
where T: Freeze, U: Freeze,

§

impl<T, U> RefUnwindSafe for StateWithUpdater<T, U>

§

impl<T, U> Send for StateWithUpdater<T, U>
where T: Send, U: Send,

§

impl<T, U> Sync for StateWithUpdater<T, U>
where T: Sync, U: Sync,

§

impl<T, U> UnwindSafe for StateWithUpdater<T, U>
where T: UnwindSafe, U: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<H> HookExt for H
where H: Hook + ?Sized,

Source§

fn use_hook(&mut self) -> Self::Value
where Self: Unpin,

A shortcut to call Hook::use_hook on Unpin hooks.
Source§

fn next_value(&mut self) -> NextValue<'_, Self>
where Self: Unpin,

Source§

fn into_values(self) -> Values<Self>
where Self: Sized,

Source§

fn values(&mut self) -> Values<&mut Self>
where Self: Unpin,

Source§

impl<H> HookPollNextUpdateExt for H

Source§

fn poll_next_update(&mut self, cx: &mut Context<'_>) -> Poll<bool>
where Self: Unpin,

A shortcut to call HookPollNextUpdate::poll_next_update on Unpin hooks.
Source§

fn next_update(&mut self) -> NextUpdate<'_, Self>
where Self: Unpin,

Get a future which polls HookPollNextUpdate::poll_next_update.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<H> IntoHook for H
where H: Hook,

Source§

type Hook = H

Source§

fn into_hook(self) -> <H as IntoHook>::Hook

Source§

fn into_hook_values(self) -> Values<Self::Hook>
where Self: Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> Captures<U> for T
where T: ?Sized,