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
sourcefn use_hook(&mut self, args: Args) -> <Self as HookLifetime<'_, Args>>::Valuewhere
Self: Unpin,
fn use_hook(&mut self, args: Args) -> <Self as HookLifetime<'_, Args>>::Valuewhere
Self: Unpin,
A shortcut to call Hook::use_hook on Unpin hooks.
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,
H: Hook<Args>, type Output = Option<<H as HookLifetime<'hook, Args>>::Value>;
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,
H: Hook<Args>, type Output = Option<<H as HookLifetime<'hook, Args>>::Value>;
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,
H: Hook<Args>,
Args: Default, type Output = Option<<H as HookLifetime<'hook, Args>>::Value>;