pub unsafe trait Mutex: 'static + Sync + Send {
    type Guard<'a>;

    const INIT: Self;

    // Required method
    fn lock(&self) -> Self::Guard<'_>;
}
Expand description

Safety

The implementation must make sure the functions in the trait behave properly.

Required Associated Types§

source

type Guard<'a>

Required Associated Constants§

source

const INIT: Self

Mutex initializer.

Required Methods§

source

fn lock(&self) -> Self::Guard<'_>

Lock a mutex.

Implementors§