[][src]Struct xarc::XarcLocal

pub struct XarcLocal<T: Send + Sync> { /* fields omitted */ }

XarcLocal is a thread-local smart pointer.

Implementations

impl<T: Send + Sync> XarcLocal<T>[src]

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

Initialize the smart pointer with value.

pub fn null() -> Self[src]

Initialize the smart pointer with null.

pub fn reset(&mut self)[src]

Reset the smart pointer to null.

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

Check if the smart pointer is null.

pub fn maybe_deref(&self) -> Option<&T>[src]

Dereference the pointer only if it is not null. None will be returned if it is null.

Trait Implementations

impl<T: Debug + Send + Sync> Debug for XarcLocal<T>[src]

impl<T: Send + Sync> Default for XarcLocal<T>[src]

impl<T: Eq + Send + Sync> Eq for XarcLocal<T>[src]

impl<T: Send + Sync, '_> From<&'_ Xarc<T>> for XarcLocal<T>[src]

impl<T: Send + Sync> Hash for XarcLocal<T>[src]

impl<T: Send + Sync> PartialEq<XarcLocal<T>> for XarcLocal<T>[src]

impl<T: Send + Sync> StructuralEq for XarcLocal<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for XarcLocal<T> where
    T: RefUnwindSafe

impl<T> !Send for XarcLocal<T>

impl<T> !Sync for XarcLocal<T>

impl<T> Unpin for XarcLocal<T>

impl<T> UnwindSafe for XarcLocal<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, 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.