[][src]Struct cgc::mem::Ptr

#[repr(transparent)]pub struct Ptr<T: ?Sized>(_);

Methods

impl<T: ?Sized> Ptr<T>[src]

pub fn get(&self) -> &mut T[src]

impl<T> Ptr<T>[src]

pub fn new(x: T) -> Self[src]

pub fn from_box(b: Box<T>) -> Self[src]

pub fn set(&self, val: T)[src]

pub fn replace(&self, val: T) -> T[src]

pub fn take(&self) -> T where
    T: Default
[src]

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

pub fn null() -> Self[src]

Trait Implementations

impl<T> Clone for Ptr<T>[src]

impl<T> Copy for Ptr<T>[src]

impl<T> Deref for Ptr<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T> Eq for Ptr<T>[src]

impl<T> Hash for Ptr<T>[src]

impl<T> PartialEq<Ptr<T>> for Ptr<T>[src]

impl<T> Send for Ptr<T>[src]

impl<T> Sync for Ptr<T>[src]

Auto Trait Implementations

impl<T: ?Sized> RefUnwindSafe for Ptr<T> where
    T: RefUnwindSafe

impl<T: ?Sized> Unpin for Ptr<T>

impl<T: ?Sized> UnwindSafe for Ptr<T> where
    T: RefUnwindSafe

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, 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.