struct ScopePtr<T>(*const T);
Expand description
Used to capture a scope &Self
pointer in jobs, without faking a lifetime.
Unsafe code is still required to dereference the pointer, but that’s fine in scope jobs that are guaranteed to execute before the scope ends.
Tuple Fields§
§0: *const T
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ScopePtr<T>
impl<T> RefUnwindSafe for ScopePtr<T>where
T: RefUnwindSafe,
impl<T> Unpin for ScopePtr<T>
impl<T> UnwindSafe for ScopePtr<T>where
T: RefUnwindSafe,
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
Source§impl<T> Pointable for T
impl<T> Pointable for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes