pub struct LenCachingRwLock<T: ?Sized> { /* private fields */ }
Expand description

Can be used in place of a RwLock where reading T’s len() without needing to lock, is advantageous. When the WriteGuard is released, T’s len() will be cached.

Implementations

Constructs a new LenCachingRwLock

Load the cached value that was returned from your T’s len() subsequent to the most recent lock being released.

Delegates to parking_lot::RwLock write().

Delegates to parking_lot::RwLock try_write().

Delegates to parking_lot::RwLock read().

Delegates to parking_lot::RwLock try_read().

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.