Skip to main content

Locking

Trait Locking 

Source
pub trait Locking: Referencing {
    // Provided methods
    fn lock(&self) { ... }
    fn unlock(&self) { ... }
}
Expand description

Trait for objects that support locking.

C++ equivalent: NS::Locking<_Class, _Base>

Provided Methods§

Source

fn lock(&self)

Lock the object.

C++ equivalent: void lock()

Source

fn unlock(&self)

Unlock the object.

C++ equivalent: void unlock()

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§