pub struct UseSetHandle<T> { /* private fields */ }
Expand description
State handle for the use_set
hook.
Implementations§
Source§impl<T> UseSetHandle<T>
impl<T> UseSetHandle<T>
Sourcepub fn replace(&self, value: T) -> Option<T>
pub fn replace(&self, value: T) -> Option<T>
Adds a value to the set, replacing the existing value, if any, that is equal to the given one. Returns the replaced value.
Sourcepub fn remove(&self, value: &T) -> bool
pub fn remove(&self, value: &T) -> bool
Removes a value from the set. Returns whether the value was present in the set.
Trait Implementations§
Source§impl<T> Clone for UseSetHandle<T>
impl<T> Clone for UseSetHandle<T>
Source§impl<T> PartialEq for UseSetHandle<T>
impl<T> PartialEq for UseSetHandle<T>
Auto Trait Implementations§
impl<T> Freeze for UseSetHandle<T>
impl<T> !RefUnwindSafe for UseSetHandle<T>
impl<T> !Send for UseSetHandle<T>
impl<T> !Sync for UseSetHandle<T>
impl<T> Unpin for UseSetHandle<T>
impl<T> !UnwindSafe for UseSetHandle<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<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> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.