Struct EffectOnce

Source
pub struct EffectOnce<E: EffectForNoneDependency> { /* private fields */ }

Implementations§

Source§

impl<E: EffectForNoneDependency> EffectOnce<E>

Source

pub fn register_effect_with(&mut self, get_effect: impl FnOnce() -> E)

Trait Implementations§

Source§

impl<E: EffectForNoneDependency> Debug for EffectOnce<E>

Source§

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

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

impl<E: EffectForNoneDependency> Default for EffectOnce<E>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<E: EffectForNoneDependency> Hook for EffectOnce<E>

Source§

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

Source§

impl<E: EffectForNoneDependency> HookPollNextUpdate for EffectOnce<E>

Source§

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

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

impl<E: EffectForNoneDependency> HookUnmount for EffectOnce<E>

Source§

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

Source§

impl<'hook, E: EffectForNoneDependency> HookValue<'hook> for EffectOnce<E>

Source§

type Value = ()

The output type of Hook::use_hook. Read more
Source§

impl<E: EffectForNoneDependency> Unpin for EffectOnce<E>

Auto Trait Implementations§

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<H, V> NonLendingHook for H
where H: Hook<Value = V> + for<'hook> HookValue<'hook>,

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,