Trait lock_order::lock::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.

Object Safety§

This trait is not object safe.

Implementors§