pub struct RawCell<T> { /* private fields */ }Expand description
Wrapper over UnsafeCell that can directly be used in statics, where all modifications require
unsafe.
Implementations§
Source§impl<T> RawCell<T>
impl<T> RawCell<T>
pub const fn new(t: T) -> Self
pub fn as_mut_ptr(&self) -> *mut T
pub fn get_mut(&mut self) -> &mut T
pub fn into_inner(self) -> T
pub unsafe fn unsafe_ref(&self) -> &T
pub unsafe fn unsafe_set(&self, t: T)
pub unsafe fn unsafe_mut(&self) -> &mut T
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for RawCell<T>
impl<T> !RefUnwindSafe for RawCell<T>
impl<T> Send for RawCell<T>where
T: Send,
impl<T> Unpin for RawCell<T>where
T: Unpin,
impl<T> UnsafeUnpin for RawCell<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for RawCell<T>where
T: UnwindSafe,
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