[−][src]Struct xarc::XarcLocal
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]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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,
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,
T: RefUnwindSafe,
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,
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, 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.
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>,