Skip to main content

Lifetime

Trait Lifetime 

Source
pub trait Lifetime<'this, ImplicitBounds: Sealed = Bounds<&'this Self>> {
    type ExclusiveGuard;
    type SharedGuard;
}
Expand description

Associated types of a Lock with a specific lifetime applied.

Required Associated Types§

Source

type ExclusiveGuard

A RAII exclusive guard on the lock; when this type is dropped, the lock must unlock.

Source

type SharedGuard

A RAII shared guard on the lock; when this type is dropped, the lock must unlock.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'this, L: Lock> Lifetime<'this> for &L

Source§

impl<'this, L: Lock> Lifetime<'this> for &mut L

Source§

impl<'this, T> Lifetime<'this> for RefCell<T>

Source§

type ExclusiveGuard = RefMut<'this, T>

Source§

type SharedGuard = Ref<'this, T>

Implementors§

Source§

impl<'this, T> Lifetime<'this> for Local<T>

Source§

type ExclusiveGuard = Guard<'this, T>

Source§

type SharedGuard = Guard<'this, T>