Skip to main content

UpgradableReadApi

Trait UpgradableReadApi 

Source
pub trait UpgradableReadApi: GuardedTarget {
    type UpgradableReadGuard<'a>: UpgradableReadGuard<Target = Self::Target>
       where Self: 'a;

    // Required method
    fn upgradable_read(&mut self) -> Self::UpgradableReadGuard<'_>;
}
Expand description

Provides a constant (but upgradable) part of the RwApi interface.

§Example

See the RwApi docs for usage examples.

Required Associated Types§

Source

type UpgradableReadGuard<'a>: UpgradableReadGuard<Target = Self::Target> where Self: 'a

Self::upgradable_read return type.

Required Methods§

Source

fn upgradable_read(&mut self) -> Self::UpgradableReadGuard<'_>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T> UpgradableReadApi for &RwLock<T>

Source§

impl<T> UpgradableReadApi for &mut RwLock<T>

Source§

impl<T> UpgradableReadApi for RwLock<T>

Source§

type UpgradableReadGuard<'a> = &'a mut T where Self: 'a

Source§

fn upgradable_read(&mut self) -> &mut T

Implementors§

Source§

impl<'a, T: ?Sized> UpgradableReadApi for &mut RwApiWrapper<'a, T>

Source§

type UpgradableReadGuard<'i> = &'i mut &'a mut T where Self: 'i

Source§

impl<'a, T: ?Sized> UpgradableReadApi for RwApiWrapper<'a, T>

Source§

type UpgradableReadGuard<'i> = &'i mut &'a mut T where Self: 'i

Source§

impl<T> UpgradableReadApi for &mut RwApiWrapperOwned<T>

Source§

type UpgradableReadGuard<'i> = &'i mut T where Self: 'i

Source§

impl<T> UpgradableReadApi for RwApiWrapperOwned<T>

Source§

type UpgradableReadGuard<'i> = &'i mut T where Self: 'i