mutex_trait::prelude

Trait TupleExt03

Source
pub trait TupleExt03 {
    type T1;
    type T2;
    type T3;

    // Required method
    fn lock<R>(
        &mut self,
        f: impl FnOnce(&mut Self::T1, &mut Self::T2, &mut Self::T3) -> R,
    ) -> R;
}
Expand description

Auto-generated tuple implementation, see Mutex for details.

Required Associated Types§

Source

type T1

Data protected by the mutex.

Source

type T2

Data protected by the mutex.

Source

type T3

Data protected by the mutex.

Required Methods§

Source

fn lock<R>( &mut self, f: impl FnOnce(&mut Self::T1, &mut Self::T2, &mut Self::T3) -> R, ) -> R

Creates a critical section and grants temporary access to the protected data.

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<T1, T2, T3> TupleExt03 for (T1, T2, T3)
where T1: Mutex, T2: Mutex, T3: Mutex,

Source§

type T1 = <T1 as Mutex>::Data

Source§

type T2 = <T2 as Mutex>::Data

Source§

type T3 = <T3 as Mutex>::Data

Source§

fn lock<R>( &mut self, f: impl FnOnce(&mut Self::T1, &mut Self::T2, &mut Self::T3) -> R, ) -> R

Implementors§