Skip to main content

AllocatorMutex

Trait AllocatorMutex 

Source
pub trait AllocatorMutex {
    type Guard<'g>
       where Self: 'g;

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

A mutex-like lock for synchronizing access to the allocator’s internal state.

Implementations include NoopMutex for single-threaded use and std::sync::Mutex.

Required Associated Types§

Source

type Guard<'g> where Self: 'g

Required Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl AllocatorMutex for NoopMutex

Source§

type Guard<'g> = () where Self: 'g