[][src]Struct crndm::ptr::Ptr

pub struct Ptr<T: PSafe + ?Sized, A: MemPool> { /* fields omitted */ }

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

impl<A: MemPool, T: PSafe + ?Sized> Ptr<T, A>[src]

pub fn is_dangling(&self) -> bool[src]

Checks if this pointer is dangling

pub fn off(&self) -> u64[src]

Returns the file offset

pub fn off_ref(&self) -> &u64[src]

Returns a reference to the file offset

Trait Implementations

impl<A: MemPool, T: PSafe + ?Sized> Clone for Ptr<T, A>[src]

impl<A: MemPool, T: PSafe + ?Sized> Copy for Ptr<T, A>[src]

impl<A: MemPool, T: Debug + PSafe + ?Sized> Debug for Ptr<T, A>[src]

impl<A: MemPool, T: PSafe + ?Sized> Deref for Ptr<T, A>[src]

type Target = T

The resulting type after dereferencing.

impl<A: MemPool, T: PSafe + ?Sized> DerefMut for Ptr<T, A>[src]

impl<A: MemPool, T: Display + PSafe + ?Sized> Display for Ptr<T, A>[src]

impl<T: Eq + PSafe + ?Sized, A: Eq + MemPool> Eq for Ptr<T, A>[src]

impl<A: MemPool, T: PSafe + ?Sized> PSafe for Ptr<T, A>[src]

The allocator does not need to implement PSafe

impl<A: MemPool, T: PSafe> PSafe for Ptr<[T], A>[src]

impl<A: MemPool, T: PSafe + ?Sized> PartialEq<Ptr<T, A>> for Ptr<T, A>[src]

impl<A: MemPool, T: PSafe> PmemUsage for Ptr<T, A>[src]

impl<A: MemPool, T> !Send for Ptr<T, A>[src]

Ptr pointers are not Send because the data they reference may be aliased.

impl<T: PSafe + ?Sized, A: MemPool> StructuralEq for Ptr<T, A>[src]

impl<A: MemPool, T> !Sync for Ptr<T, A>[src]

Ptr pointers are not Sync because the data they reference may be aliased.

impl<A: MemPool, T> !TxOutSafe for Ptr<T, A>[src]

Auto Trait Implementations

impl<T: ?Sized, A> LooseTxInUnsafe for Ptr<T, A> where
    A: LooseTxInUnsafe,
    T: LooseTxInUnsafe
[src]

impl<T: ?Sized, A> RefUnwindSafe for Ptr<T, A> where
    A: RefUnwindSafe,
    T: RefUnwindSafe
[src]

impl<T: ?Sized, A> TxInSafe for Ptr<T, A> where
    A: TxInSafe,
    T: TxInSafe
[src]

impl<T: ?Sized, A> Unpin for Ptr<T, A> where
    A: Unpin,
    T: Unpin
[src]

impl<T: ?Sized, A> UnwindSafe for Ptr<T, A> where
    A: UnwindSafe,
    T: UnwindSafe
[src]

impl<T: ?Sized, A> VSafe for Ptr<T, A> where
    A: VSafe,
    T: VSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, A> ToString<A> for T where
    A: MemPool,
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,