[][src]Enum peril::HazardValue

pub enum HazardValue<'registry, T: 'static> {
    Boxed {
        ptr: *mut WrappedValue<T>,
        registry: Option<&'registry HazardRegistry>,
    },
    Dummy {
        ptr: *mut WrappedValue<T>,
    },
}

Variants

Boxed

Fields of Boxed

ptr: *mut WrappedValue<T>registry: Option<&'registry HazardRegistry>
Dummy

Fields of Dummy

ptr: *mut WrappedValue<T>

Implementations

impl<'registry, T: 'static> HazardValue<'registry, T>[src]

pub fn boxed(value: T) -> HazardValue<'registry, T>[src]

pub fn dummy(value: usize) -> HazardValue<'registry, T>[src]

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

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

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

Trait Implementations

impl<'registry, T: 'static> Drop for HazardValue<'registry, T>[src]

Auto Trait Implementations

impl<'registry, T> RefUnwindSafe for HazardValue<'registry, T> where
    T: RefUnwindSafe
[src]

impl<'registry, T> !Send for HazardValue<'registry, T>[src]

impl<'registry, T> !Sync for HazardValue<'registry, T>[src]

impl<'registry, T> Unpin for HazardValue<'registry, T>[src]

impl<'registry, T> UnwindSafe for HazardValue<'registry, T> where
    T: RefUnwindSafe
[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, 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.