Struct patternfly_dioxus::UseSharedState
[−]pub struct UseSharedState<'a, T>where
T: 'static,{ /* private fields */ }Implementations
pub fn read(&self) -> Ref<'_, T>
pub fn notify_consumers(self)
pub fn read_write(&self) -> (Ref<'_, T>, &UseSharedState<'a, T>)
pub fn write(&self) -> RefMut<'_, T>
pub fn write(&self) -> RefMut<'_, T>
Calling “write” will force the component to re-render
TODO: We prevent unncessary notifications only in the hook, but we should figure out some more global lock
pub fn write_silent(&self) -> RefMut<'_, T>
pub fn write_silent(&self) -> RefMut<'_, T>
Allows the ability to write the value without forcing a re-render
pub fn inner(&self) -> Rc<RefCell<ProvidedStateInner<T>>>
Trait Implementations
fn clone(&self) -> UseSharedState<'a, T>
fn clone(&self) -> UseSharedState<'a, T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more