Struct oxygengine::prelude::UnsafeMut
source · 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) -> UnsafeMut<'a, T>
pub unsafe fn upgrade(scope: &'a UnsafeScope, v: &mut T) -> UnsafeMut<'a, T>
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> 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> !UnwindSafe 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