pub struct SharedState { /* private fields */ }Implementations§
pub fn new() -> Self
pub fn insert<T>(&self, value: T) -> Option<Arc<T>>
pub fn insert_arc<T>(&self, value: Arc<T>) -> Option<Arc<T>>
pub fn get<T>(&self) -> Option<Arc<T>>
Sourcepub fn try_get<T>(&self) -> Result<Option<Arc<T>>, Poisoned>
pub fn try_get<T>(&self) -> Result<Option<Arc<T>>, Poisoned>
Like get, but tells a poisoned lock apart from a missing
service.
pub fn remove<T>(&self) -> Option<Arc<T>>
pub fn contains<T>(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
impl<M> AllowedSignal<M> for Mwhere
M: 'static,
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