pub struct UncheckedMutable<T: ?Sized> { /* private fields */ }
Expand description
It may be cloned as many times as needed. It may be borrowed at once by multiple threads without any checks. It is up to crate user to prevent any data races
Implementations§
Source§impl<T> UncheckedMutable<T>
impl<T> UncheckedMutable<T>
Source§impl<T: ?Sized> UncheckedMutable<T>
impl<T: ?Sized> UncheckedMutable<T>
Sourcepub fn from_rc(data: Rc<UnsafeCell<T>>) -> Self
pub fn from_rc(data: Rc<UnsafeCell<T>>) -> Self
Creates an instance from already shared data.
Sourcepub fn data(&self) -> Rc<UnsafeCell<T>>
pub fn data(&self) -> Rc<UnsafeCell<T>>
Returns owned data
Trait Implementations§
Source§impl<T: ?Sized> Borrow<T> for UncheckedMutable<T>
impl<T: ?Sized> Borrow<T> for UncheckedMutable<T>
Source§impl<T: ?Sized> BorrowMut<T> for UncheckedMutable<T>
impl<T: ?Sized> BorrowMut<T> for UncheckedMutable<T>
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T: ?Sized> Clone for UncheckedMutable<T>
impl<T: ?Sized> Clone for UncheckedMutable<T>
Auto Trait Implementations§
impl<T> Freeze for UncheckedMutable<T>where
T: ?Sized,
impl<T> !RefUnwindSafe for UncheckedMutable<T>
impl<T> !Send for UncheckedMutable<T>
impl<T> !Sync for UncheckedMutable<T>
impl<T> Unpin for UncheckedMutable<T>where
T: ?Sized,
impl<T> !UnwindSafe for UncheckedMutable<T>
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