[−][src]Struct crndm::ptr::Ptr
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]
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
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]
pub fn eq(&self, other: &Self) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[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]
A: LooseTxInUnsafe,
T: LooseTxInUnsafe,
impl<T: ?Sized, A> RefUnwindSafe for Ptr<T, A> where
A: RefUnwindSafe,
T: RefUnwindSafe,
[src]
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<T: ?Sized, A> TxInSafe for Ptr<T, A> where
A: TxInSafe,
T: TxInSafe,
[src]
A: TxInSafe,
T: TxInSafe,
impl<T: ?Sized, A> Unpin for Ptr<T, A> where
A: Unpin,
T: Unpin,
[src]
A: Unpin,
T: Unpin,
impl<T: ?Sized, A> UnwindSafe for Ptr<T, A> where
A: UnwindSafe,
T: UnwindSafe,
[src]
A: UnwindSafe,
T: UnwindSafe,
impl<T: ?Sized, A> VSafe for Ptr<T, A> where
A: VSafe,
T: VSafe,
[src]
A: VSafe,
T: VSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, A> ToString<A> for T where
A: MemPool,
T: Display + ?Sized,
[src]
A: MemPool,
T: Display + ?Sized,
pub default fn to_pstring(&Self, &Journal<A>) -> String<A>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,