Trait DowngradableWriteApi

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

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

Provides a mutable (but downgradable) part of the RwApi interface.

§Example

See the RwApi docs for usage examples.

Required Associated Types§

Source

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

Required Methods§

Source

fn downgradable_write(&mut self) -> Self::DowngradableWriteGuard<'_>

WriteApi::write analogue, which return type can be downgraded.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> DowngradableWriteApi for &RwLock<T>

Source§

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

Source§

impl<T> DowngradableWriteApi for RwLock<T>

Implementors§