pub struct Shared<T>(/* private fields */);Available on crate feature
sync-mutex only.Expand description
State shared between the parts of a controller, across threads.
Implementations§
Sourcepub fn borrow(&self) -> Ref<'_, T>
pub fn borrow(&self) -> Ref<'_, T>
Borrows the contents.
§Panics
Without sync-mutex, if a mutable borrow is live — core::cell::RefCell’s rule. With
it, never: a poisoned lock is recovered from rather than propagated, because a controller
that stopped answering every node because one task panicked would turn one fault into an
outage.
Sourcepub fn borrow_mut(&self) -> RefMut<'_, T>
pub fn borrow_mut(&self) -> RefMut<'_, T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Takes the contents out.
Trait Implementations§
Auto Trait Implementations§
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