Struct hooks::EffectOnce
source · pub struct EffectOnce<E: EffectForNoneDependency> { /* private fields */ }Implementations
sourceimpl<E: EffectForNoneDependency> EffectOnce<E>
impl<E: EffectForNoneDependency> EffectOnce<E>
pub fn use_hook_with(self: Pin<&mut Self>, get_effect: impl FnOnce() -> E)
Trait Implementations
sourceimpl<E: EffectForNoneDependency> Debug for EffectOnce<E>
impl<E: EffectForNoneDependency> Debug for EffectOnce<E>
sourceimpl<E: EffectForNoneDependency> Default for EffectOnce<E>
impl<E: EffectForNoneDependency> Default for EffectOnce<E>
sourceimpl<E: EffectForNoneDependency> Drop for EffectOnce<E>
impl<E: EffectForNoneDependency> Drop for EffectOnce<E>
sourceimpl<E: EffectForNoneDependency> Hook<(E,)> for EffectOnce<E>
impl<E: EffectForNoneDependency> Hook<(E,)> for EffectOnce<E>
fn use_hook<'hook>(
self: Pin<&'hook mut Self>,
(effect): (E,)
) -> <Self as HookLifetime<'hook, (E,)>>::Valuewhere
Self: 'hook,
sourceimpl<E: EffectForNoneDependency> HookBounds for EffectOnce<E>
impl<E: EffectForNoneDependency> HookBounds for EffectOnce<E>
type Bounds = EffectOnce<E>
sourceimpl<'hook, E: EffectForNoneDependency> HookLifetime<'hook, (E,), &'hook EffectOnce<E>> for EffectOnce<E>
impl<'hook, E: EffectForNoneDependency> HookLifetime<'hook, (E,), &'hook EffectOnce<E>> for EffectOnce<E>
sourceimpl<E: EffectForNoneDependency> HookPollNextUpdate for EffectOnce<E>
impl<E: EffectForNoneDependency> HookPollNextUpdate for EffectOnce<E>
impl<E: EffectForNoneDependency> Unpin for EffectOnce<E>
Auto Trait Implementations
impl<E> RefUnwindSafe for EffectOnce<E>where
E: RefUnwindSafe,
<E as EffectForNoneDependency>::Cleanup: RefUnwindSafe,
impl<E> Send for EffectOnce<E>where
E: Send,
<E as EffectForNoneDependency>::Cleanup: Send,
impl<E> Sync for EffectOnce<E>where
E: Sync,
<E as EffectForNoneDependency>::Cleanup: Sync,
impl<E> UnwindSafe for EffectOnce<E>where
E: UnwindSafe,
<E as EffectForNoneDependency>::Cleanup: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Args, H> HookExt<Args> for Hwhere
H: Hook<Args> + ?Sized,
impl<Args, H> HookExt<Args> for Hwhere
H: Hook<Args> + ?Sized,
sourcefn use_hook(&mut self, args: Args) -> Self::Valuewhere
Self: Unpin,
fn use_hook(&mut self, args: Args) -> Self::Valuewhere
Self: Unpin,
A shortcut to call
Hook::use_hook on Unpin hooks.fn next_value(&mut self, args: Args) -> NextValue<'_, Self, Args>where
Self: Unpin,
fn next_value_with<F>(&mut self, get_args: F) -> NextValueWith<'_, Self, Args, F>where
F: FnOnce(Pin<&mut Self>) -> Args,
Self: Unpin,
fn next_value_with_default_args(
&mut self
) -> NextValueWithDefaultArgs<'_, Self, Args>where
Self: Unpin,
Args: Default,
sourceimpl<H> HookPollNextUpdateExt for Hwhere
H: HookPollNextUpdate + ?Sized,
impl<H> HookPollNextUpdateExt for Hwhere
H: HookPollNextUpdate + ?Sized,
sourcefn poll_next_update(&mut self, cx: &mut Context<'_>) -> Poll<bool>where
Self: Unpin,
fn poll_next_update(&mut self, cx: &mut Context<'_>) -> Poll<bool>where
Self: Unpin,
A shortcut to call [
Hook::poll_next_update] on Unpin hooks.sourcefn next_update(&mut self) -> NextUpdate<'_, Self>where
Self: Unpin,
fn next_update(&mut self) -> NextUpdate<'_, Self>where
Self: Unpin,
Get a future which polls [
Hook::poll_next_update].