pub struct GenRefOwner<T: 'static>(/* private fields */);
Implementations§
Source§impl<T: 'static> GenRefOwner<T>
impl<T: 'static> GenRefOwner<T>
Trait Implementations§
Source§impl<T: 'static> Clone for GenRefOwner<T>
impl<T: 'static> Clone for GenRefOwner<T>
Source§impl<T: 'static> Hook for GenRefOwner<T>
impl<T: 'static> Hook for GenRefOwner<T>
Source§impl<T: 'static> HookPollNextUpdate for GenRefOwner<T>
impl<T: 'static> HookPollNextUpdate for GenRefOwner<T>
Source§impl<T: 'static> HookUnmount for GenRefOwner<T>
impl<T: 'static> HookUnmount for GenRefOwner<T>
Source§impl<'hook, T: 'static> HookValue<'hook> for GenRefOwner<T>
impl<'hook, T: 'static> HookValue<'hook> for GenRefOwner<T>
type Value = T
fn map<R>(&self, f: impl FnOnce(&Self::Value) -> R) -> R
fn map_mut<R>(&self, f: impl FnOnce(&mut Self::Value) -> R) -> R
fn get(&self) -> Self::Value
fn get_cloned(&self) -> Self::Value
Source§fn replace_mut<F: FnOnce(&mut Self::Value) -> Self::Value>(
&self,
f: F,
) -> Self::Value
fn replace_mut<F: FnOnce(&mut Self::Value) -> Self::Value>( &self, f: F, ) -> Self::Value
The old value is returned.
Source§fn equivalent_to(&self, other: &Self) -> bool
fn equivalent_to(&self, other: &Self) -> bool
Returns
true
if self
and other
are sharing values from the same allocation.
In that case, self
and other
are equivalent to each other
because calling the same method on either of them leads to the same result.fn set(&self, new_value: Self::Value)
Source§fn replace_with<F: FnOnce(&Self::Value) -> Self::Value>(
&self,
f: F,
) -> Self::Value
fn replace_with<F: FnOnce(&Self::Value) -> Self::Value>( &self, f: F, ) -> Self::Value
The old value is returned.
fn try_unwrap(self) -> Result<Self::Value, Self>
fn unwrap_or_get_cloned(self) -> Self::Value
impl<T: 'static> Unpin for GenRefOwner<T>
Auto Trait Implementations§
impl<T> Freeze for GenRefOwner<T>
impl<T> !RefUnwindSafe for GenRefOwner<T>
impl<T> !Send for GenRefOwner<T>
impl<T> !Sync for GenRefOwner<T>
impl<T> !UnwindSafe for GenRefOwner<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<H> HookExt for H
impl<H> HookExt for H
Source§fn use_hook(&mut self) -> Self::Valuewhere
Self: Unpin,
fn use_hook(&mut self) -> Self::Valuewhere
Self: Unpin,
A shortcut to call
Hook::use_hook
on Unpin hooks.fn next_value(&mut self) -> NextValue<'_, Self>where
Self: Unpin,
fn into_values(self) -> Values<Self>where
Self: Sized,
fn values(&mut self) -> Values<&mut Self>where
Self: Unpin,
Source§impl<H> HookPollNextUpdateExt for Hwhere
H: HookPollNextUpdate + ?Sized,
impl<H> HookPollNextUpdateExt for Hwhere
H: HookPollNextUpdate + ?Sized,
Source§fn 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
HookPollNextUpdate::poll_next_update
on Unpin hooks.Source§fn next_update(&mut self) -> NextUpdate<'_, Self>where
Self: Unpin,
fn next_update(&mut self) -> NextUpdate<'_, Self>where
Self: Unpin,
Get a future which polls
HookPollNextUpdate::poll_next_update
.