lock_order::lock

Trait UnlockedAccessMarkerFor

Source
pub trait UnlockedAccessMarkerFor<T> {
    type Data: 'static;

    // Required method
    fn unlocked_access(t: &T) -> &Self::Data;
}
Expand description

Declares a type that is an UnlockedAccess marker for some field Data within T.

This is the equivalent of LockLevelFor for UnlockedAccess, but given unlocked access is freely available through borrows the foreign type can safely expose a getter.

Required Associated Types§

Source

type Data: 'static

The data type within T that this an unlocked access marker for.

Required Methods§

Source

fn unlocked_access(t: &T) -> &Self::Data

Retrieves Self::Data from T.

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.

Implementors§