pub struct UnsafeMut<'a, T>(/* private fields */);Implementations§
Source§impl<'a, T> UnsafeMut<'a, T>
impl<'a, T> UnsafeMut<'a, T>
Sourcepub unsafe fn upgrade(scope: &'a UnsafeScope, v: &mut T) -> Self
pub unsafe fn upgrade(scope: &'a UnsafeScope, v: &mut T) -> Self
§Safety
Extending lifetimes is unsafe and when done wrongly can cause undefined behaviour. Make sure lifetime can be extended to the scope where data behind reference won’t be moved.
Auto Trait Implementations§
impl<'a, T> !UnwindSafe for UnsafeMut<'a, T>
impl<'a, T> Freeze for UnsafeMut<'a, T>
impl<'a, T> RefUnwindSafe for UnsafeMut<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for UnsafeMut<'a, T>where
T: Send,
impl<'a, T> Sync for UnsafeMut<'a, T>where
T: Sync,
impl<'a, T> Unpin for UnsafeMut<'a, T>
impl<'a, T> UnsafeUnpin for UnsafeMut<'a, 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