Struct yew_hooks::UseSetHandle
source · 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>
Auto Trait Implementations§
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> 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.