//! # The Lock Interface
//!
//! This module defines the contract for synchronization primitives used by the Slab Allocator.
//! By using a trait, the allocator remains agnostic of the environment, allowing it to work
//! in single-threaded systems, multi-threaded applications, or even interrupt-driven kernels.
//!
//! ## Implementing Your Own Lock
//!
//! If the provided [`SpinLock`] or [`NoLock`] do not fit your needs, you can implement
//! [`LockTrait`] for your own type.
//!
//! ### THE 16-BYTE RULE
//! To keep the `Slab` header compact and minimize internal fragmentation, any type
//! implementing `LockTrait` **MUST NOT exceed 16 bytes** in size. This is enforced
//! via a `static_assert` within the `Slab` struct.
//!
//! If your lock needs more state, consider storing a pointer to an external structure.