Trait starnix_sync::LockFor
source · pub trait LockFor<L> {
type Data;
type Guard<'l>: DerefMut<Target = Self::Data>
where Self: 'l;
// Required method
fn lock(&self) -> Self::Guard<'_>;
}
Expand description
Describes how to apply a lock type to the implementing type.
An implementation of LockFor<L>
for some Self
means that Self
can
be used to unlock some state that is under the lock indicated by L
.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.