Struct oxygengine_core::ecs::UnsafeRef
source · [−]pub struct UnsafeRef<'a, T>(_, _);Implementations
sourceimpl<'a, T> UnsafeRef<'a, T>
impl<'a, T> UnsafeRef<'a, T>
sourcepub unsafe fn upgrade(scope: &'a UnsafeScope, v: &T) -> Self
pub unsafe fn upgrade(scope: &'a UnsafeScope, v: &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> RefUnwindSafe for UnsafeRef<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for UnsafeRef<'a, T> where
T: Sync,
impl<'a, T> Sync for UnsafeRef<'a, T> where
T: Sync,
impl<'a, T> Unpin for UnsafeRef<'a, T>
impl<'a, T> UnwindSafe for UnsafeRef<'a, T> where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more