Trait hooks_core::HookExt

source ·
pub trait HookExt<Args>: Hook<Args> {
    fn use_hook(&mut self, args: Args) -> <Self as HookLifetime<'_, Args>>::Value
    where
        Self: Unpin
, { ... } fn next_value(&mut self, args: Args) -> NextValue<'_, Self, Args>Notable traits for NextValue<'hook, H, Args>impl<'hook, H: ?Sized, Args> Future for NextValue<'hook, H, Args>where
    H: Hook<Args>,
type Output = Option<<H as HookLifetime<'hook, Args>>::Value>;

    where
        Self: Unpin
, { ... } fn next_value_with<F: FnOnce(Pin<&mut Self>) -> Args>(
        &mut self,
        get_args: F
    ) -> NextValueWith<'_, Self, Args, F>Notable traits for NextValueWith<'hook, H, Args, F>impl<'hook, H: ?Sized, Args, F: FnOnce(Pin<&mut H>) -> Args> Future for NextValueWith<'hook, H, Args, F>where
    H: Hook<Args>,
type Output = Option<<H as HookLifetime<'hook, Args>>::Value>;

    where
        Self: Unpin
, { ... } fn next_value_with_default_args(
        &mut self
    ) -> NextValueWithDefaultArgs<'_, Self, Args>Notable traits for NextValueWithDefaultArgs<'hook, H, Args>impl<'hook, H: ?Sized, Args> Future for NextValueWithDefaultArgs<'hook, H, Args>where
    H: Hook<Args>,
    Args: Default,
type Output = Option<<H as HookLifetime<'hook, Args>>::Value>;

    where
        Self: Unpin,
        Args: Default
, { ... } }

Provided Methods

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

Implementors