pub struct VarHandle(/* private fields */);Expand description
Handle to a variable or animation hook.
This can represent a widget subscriber, a var binding, var app handler or animation, dropping the handler stops the behavior it represents.
Note that the hook closure is not dropped immediately when the handle is dropped, usually it will drop only the next time it would have been called.
Implementations§
Source§impl VarHandle
impl VarHandle
Sourcepub fn perm(self)
pub fn perm(self)
Drop the handle without stopping the behavior it represents.
Note that the behavior can still be stopped by dropping the involved variables.
Sourcepub fn chain(self, other: Self) -> VarHandles
pub fn chain(self, other: Self) -> VarHandles
Create a VarHandles collection with self and other.
Trait Implementations§
Source§impl Extend<VarHandle> for VarHandles
impl Extend<VarHandle> for VarHandles
Source§fn extend<T: IntoIterator<Item = VarHandle>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = VarHandle>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl From<VarHandle> for VarHandles
impl From<VarHandle> for VarHandles
Source§impl FromIterator<VarHandle> for VarHandles
impl FromIterator<VarHandle> for VarHandles
Auto Trait Implementations§
impl Freeze for VarHandle
impl RefUnwindSafe for VarHandle
impl Send for VarHandle
impl Sync for VarHandle
impl Unpin for VarHandle
impl UnwindSafe for VarHandle
Blanket Implementations§
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Clone the value.
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
Swap value with
other if both are of the same type.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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more