pub unsafe trait ExclusiveLockToken<Parent: ?Sized, Class> {
// Required methods
fn parent(&self) -> *const Parent;
fn lock_token_mut(&mut self) -> &mut LockToken<'_, Class>;
}Expand description
Trait for lock guard types bound to a Parent struct instance that hold exclusive ownership
of a lock of class Class and can yield a mutable LockToken.
§Safety
Implementors must guarantee that they hold exclusive ownership of the lock of class Class
on the Parent struct instance at ExclusiveLockToken::parent for the duration of the
mutable borrow of self.
Required Methods§
Sourcefn parent(&self) -> *const Parent
fn parent(&self) -> *const Parent
Returns the address of the parent struct instance to which this guard is bound.
Sourcefn lock_token_mut(&mut self) -> &mut LockToken<'_, Class>
fn lock_token_mut(&mut self) -> &mut LockToken<'_, Class>
Returns a mutable reference to the underlying LockToken.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".