pub trait WriteApi {
    type Target;
    type WriteGuard<'a>: DerefMut<Target = Self::Target>
       where Self: 'a;

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

Provides mutable part of the ReadWriteApi interface.

Required Associated Types§

source

type Target

Dereference target of the return type of the Self::write method.

source

type WriteGuard<'a>: DerefMut<Target = Self::Target> where Self: 'a

Self::write return type.

Required Methods§

source

fn write(&mut self) -> Self::WriteGuard<'_>

[RwLock::write] analogue.

Implementations on Foreign Types§

source§

impl<T> WriteApi for &mut Twhere T: AutoWriteApi,

§

type Target = <T as AutoWriteApi>::Target

§

type WriteGuard<'a> = &'a mut <T as AutoWriteApi>::Target where Self: 'a

source§

fn write(&mut self) -> &mut Self::Target

source§

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

§

type Target = T

§

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

source§

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

source§

impl<T> WriteApi for &RwLock<T>

§

type Target = T

§

type WriteGuard<'a> = RwLockWriteGuard<'a, RawRwLock, T> where Self: 'a

source§

fn write(&mut self) -> RwLockWriteGuard<'_, T>

source§

impl<T> WriteApi for RwLock<T>

§

type Target = T

§

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

source§

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

Implementors§