pub struct StateRegistry { /* private fields */ }Implementations§
Source§impl StateRegistry
impl StateRegistry
pub fn new() -> Self
pub fn insert<S: SyncState>(&self, value: S) -> Result<()>
pub fn read<S: SyncState>(&self) -> Result<S>
pub fn mutate<S: SyncState>(&self, f: impl FnOnce(&mut S)) -> Result<S>
pub fn get_json(&self, name: &str) -> Result<Value>
pub fn set_json(&self, name: &str, value: Value) -> Result<()>
pub fn contains(&self, name: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StateRegistry
impl RefUnwindSafe for StateRegistry
impl Send for StateRegistry
impl Sync for StateRegistry
impl Unpin for StateRegistry
impl UnsafeUnpin for StateRegistry
impl UnwindSafe for StateRegistry
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