pub struct Mut<'host> { /* private fields */ }Expand description
A mutable reference to an espy value.
espy does not have inherited mutability, only interior mutability.
This means that Mut contains a RefCell.
Only the original Mut contains a strong Rc to its contained
value; any time the mutable reference is copied the copy is instead a weak
reference. This prevents reference cycles from being constructed by espy
programs to leak memory. However, Mut::upgrade is provided for hosts to
upgrade weak references into strong ones should the need arise.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'host> Freeze for Mut<'host>
impl<'host> !RefUnwindSafe for Mut<'host>
impl<'host> !Send for Mut<'host>
impl<'host> !Sync for Mut<'host>
impl<'host> Unpin for Mut<'host>
impl<'host> !UnwindSafe for Mut<'host>
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