pub trait TupleExt02 {
    type T1;
    type T2;

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

Auto-generated tuple implementation, see Mutex for details.

Required Associated Types§

type T1

Data protected by the mutex.

type T2

Data protected by the mutex.

Required Methods§

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

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<T1, T2> TupleExt02 for (T1, T2)
where T1: Mutex, T2: Mutex,

§

type T1 = <T1 as Mutex>::Data

§

type T2 = <T2 as Mutex>::Data

§

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

Implementors§