Skip to main content

GlobalLockBackend

Trait GlobalLockBackend 

Source
pub trait GlobalLockBackend {
    type Item: 'static;
    type Backend: Backend + 'static;

    const NAME: &'static CStr;

    // Required method
    fn get_lock_class() -> Pin<&'static LockClassKey>;
}
Expand description

Trait implemented for marker types for global locks.

See global_lock! for examples.

Required Associated Constants§

Source

const NAME: &'static CStr

The name for this global lock.

Required Associated Types§

Source

type Item: 'static

Item type stored in this global lock.

Source

type Backend: Backend + 'static

The backend used for this global lock.

Required Methods§

Source

fn get_lock_class() -> Pin<&'static LockClassKey>

The class for this global lock.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§