Expand description
A wrapper around a raw persistent pointer that indicates that the possessor
of this wrapper owns the referent. Useful for building abstractions like
Pbox<T,P>
, Vec<T,P>
, and String<P>
.
Just like raw pointers, it contains the address of the object, but the address is static within a file.
Note that, memory pools are types, not objects. For more information,
please see MemPool
.
Implementations
Trait Implementations
sourceimpl<A: MemPool, T: PSafe> PmemUsage for Ptr<T, A>
impl<A: MemPool, T: PSafe> PmemUsage for Ptr<T, A>
sourcefn size_of() -> usize
fn size_of() -> usize
Size of the object on Persistent Memory Assuming that self is not on PM, or considered else were, the size of allocated persistent memory is the sum of all persistent objects pointed by this object. Read more
sourcefn size_of_pmem() -> usize
fn size_of_pmem() -> usize
Size of the object on Persistent Memory including Self
Assuming that self is also on PM (e.g. the root object), the size of allocated persistent memory
includes the size of all objects pointed by this object and the size Self
. Read more
impl<A: MemPool, T: PSafe + ?Sized> Copy for Ptr<T, A>
impl<T: Eq + ?Sized, A: Eq + MemPool> Eq for Ptr<T, A>
impl<A: MemPool, T: PSafe + ?Sized> PSafe for Ptr<T, A>
The allocator does not need to implement PSafe
impl<A: MemPool, T: PSafe> PSafe for Ptr<[T], A>
impl<A: MemPool, T> !Send for Ptr<T, A>
Ptr
pointers are not Send
because the data they reference may be aliased.
impl<T: ?Sized, A: MemPool> StructuralEq for Ptr<T, A>
impl<A: MemPool, T> !Sync for Ptr<T, A>
Ptr
pointers are not Sync
because the data they reference may be aliased.
impl<A: MemPool, T> !TxOutSafe for Ptr<T, A>
Auto Trait Implementations
impl<T: ?Sized, A> LooseTxInUnsafe for Ptr<T, A> where
T: LooseTxInUnsafe,
impl<T: ?Sized, A> PSend for Ptr<T, A> where
A: PSend,
T: PSend,
impl<T: ?Sized, A> RefUnwindSafe for Ptr<T, A> where
T: RefUnwindSafe,
impl<T: ?Sized, A> TxInSafe for Ptr<T, A> where
T: TxInSafe,
impl<T: ?Sized, A> Unpin for Ptr<T, A> where
A: Unpin,
T: Unpin,
impl<T: ?Sized, A> UnwindSafe for Ptr<T, A> where
T: UnwindSafe,
impl<T: ?Sized, A> VSafe for Ptr<T, A> where
A: VSafe,
T: VSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more