Struct FnHook

Source
pub struct FnHook<InnerHook: Default, U, I: Initialized> {
    pub inner_hook: InnerHook,
    pub use_hook: U,
    pub initialized: I,
}

Fields§

§inner_hook: InnerHook§use_hook: U§initialized: I

Trait Implementations§

Source§

impl<InnerHook: Default + Default, U: Default, I: Default + Initialized> Default for FnHook<InnerHook, U, I>

Source§

fn default() -> FnHook<InnerHook, U, I>

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

impl<InnerHook: Default + HookPollNextUpdate + HookUnmount, U: for<'hook> FnMutOneArg<Pin<&'hook mut InnerHook>>, I: Initialized> Hook for FnHook<InnerHook, U, I>

Source§

fn use_hook( self: Pin<&mut Self>, ) -> <U as FnMutOneArg<Pin<&mut InnerHook>>>::FnOutput

Source§

impl<InnerHook, U, I: Initialized> HookPollNextUpdate for FnHook<InnerHook, U, I>

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<InnerHook, U, I: Initialized> HookUnmount for FnHook<InnerHook, U, I>

Source§

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

Source§

impl<'hook, InnerHook: Default + HookPollNextUpdate + HookUnmount, U: FnMutOneArg<Pin<&'hook mut InnerHook>>, I: Initialized> HookValue<'hook> for FnHook<InnerHook, U, I>

Source§

impl<'__pin, InnerHook: Default, U, I: Initialized> Unpin for FnHook<InnerHook, U, I>
where PinnedFieldsOf<__Origin<'__pin, InnerHook, U, I>>: Unpin,

Auto Trait Implementations§

§

impl<InnerHook, U, I> Freeze for FnHook<InnerHook, U, I>
where InnerHook: Freeze, U: Freeze, I: Freeze,

§

impl<InnerHook, U, I> RefUnwindSafe for FnHook<InnerHook, U, I>
where InnerHook: RefUnwindSafe, U: RefUnwindSafe, I: RefUnwindSafe,

§

impl<InnerHook, U, I> Send for FnHook<InnerHook, U, I>
where InnerHook: Send, U: Send, I: Send,

§

impl<InnerHook, U, I> Sync for FnHook<InnerHook, U, I>
where InnerHook: Sync, U: Sync, I: Sync,

§

impl<InnerHook, U, I> UnwindSafe for FnHook<InnerHook, U, I>
where InnerHook: UnwindSafe, U: UnwindSafe, I: 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 as HookValue<'_>>::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,