[][src]Struct crndm::ptr::NonNull

pub struct NonNull<T: PSafe + ?Sized> { /* fields omitted */ }

An unsafe pointer with dereferencing capability

This type is !PSafe and its constructor functions are unsafe. This is because of NonNull treating like a raw pointer. NonNull objects are useful for obtaining performance.

PNonNull is an alias name in the pool module for LogNonNull.

Implementations

impl<T: PSafe> NonNull<T>[src]

pub const fn new_unchecked(ptr: *const T) -> Self[src]

Creates a new NonNull.

Safety

ptr and logged must be non-null.

pub fn new(ptr: *const T) -> Option<Self>[src]

Creates a Some(NonNull) if ptr is not null; otherwise None.

pub fn as_ref<'a, 'b>(&'a self) -> &'b T[src]

Trait Implementations

impl<T: PSafe + ?Sized> Clone for NonNull<T>[src]

impl<T: PSafe + ?Sized> Copy for NonNull<T>[src]

impl<T: Debug + PSafe + ?Sized> Debug for NonNull<T>[src]

impl<T: PSafe + ?Sized> Deref for NonNull<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T: Display + PSafe + ?Sized> Display for NonNull<T>[src]

impl<T: ?Sized> !Send for NonNull<T>[src]

impl<T: ?Sized> !Sync for NonNull<T>[src]

impl<T: ?Sized> !TxOutSafe for NonNull<T>[src]

Auto Trait Implementations

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

impl<T> !PSafe for NonNull<T>[src]

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

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

impl<T: ?Sized> Unpin for NonNull<T>[src]

impl<T: ?Sized> UnwindSafe for NonNull<T> where
    T: RefUnwindSafe
[src]

impl<T: ?Sized> VSafe for NonNull<T> where
    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>,