Struct medea_reactive::Guarded[][src]

pub struct Guarded<T> { /* fields omitted */ }

Wrapper around a data T decrementing its underlying counter on Drop.

Implementations

impl<T> Guarded<T>[src]

#[must_use]pub fn into_parts(self) -> (T, Guard)[src]

Unwraps this Guarded into its inner value and its Guard.

#[must_use]pub fn into_inner(self) -> T[src]

Unwraps this Guarded into its inner value dropping its Guard in-place.

impl<T> Guarded<Option<T>>[src]

#[must_use]pub fn transpose(self) -> Option<Guarded<T>>[src]

Transposes an Guarded Option into a Option with a Guarded value within.

Trait Implementations

impl<T> AsRef<T> for Guarded<T>[src]

impl<T: Debug> Debug for Guarded<T>[src]

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

type Target = T

The resulting type after dereferencing.

impl<T> SubscribersStore<T, Guarded<T>> for SubStore<T> where
    T: Clone + 'static, 
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Guarded<T>

impl<T> !Send for Guarded<T>

impl<T> !Sync for Guarded<T>

impl<T> Unpin for Guarded<T> where
    T: Unpin

impl<T> !UnwindSafe for Guarded<T>

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.