pub struct RawManagedMemory<T> {
pub ptr: *mut T,
pub len: usize,
pub attach_flags: MemoryAttachFlags,
pub context: Arc<Context>,
}Expand description
Raw ownership of a managed allocation, its attachment policy, and its context.
Free ptr while context is alive, or re-adopt the value with ManagedMemory::from_raw.
Fields§
§ptr: *mut TBase of the allocation, or null for an empty one.
len: usizeNumber of elements of T.
attach_flags: MemoryAttachFlagsAttachment policy of the allocation.
context: Arc<Context>Context the allocation belongs to.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for RawManagedMemory<T>
impl<T> !Send for RawManagedMemory<T>
impl<T> !Sync for RawManagedMemory<T>
impl<T> !UnwindSafe for RawManagedMemory<T>
impl<T> Forget for RawManagedMemory<T>
impl<T> Freeze for RawManagedMemory<T>
impl<T> Move for RawManagedMemory<T>
impl<T> Unpin for RawManagedMemory<T>
impl<T> UnsafeUnpin for RawManagedMemory<T>where
*mut T: UnsafeUnpin,
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