Module sublock::prooflock [] [src]

A variant of RwLock based on proofs of opening. Faster and safer than atomlock, but a bit more verbose. A variant of RwLock with sublocks that can be opened at no cost by providing a proof that the main lock is opened.

Structs

MainLock

A variant of RwLock with sublocks that can be opened at no cost by providing a proof that the main lock is opened.

Proof

A proof that the MainLock is currently opened. Its lifetime is limited by that of the ReadGuard that provided it.

ProofMut

A proof that the MainLock is currently opened mutably. Its lifetime is limited by that of the WriteGuard that provided it.

SubCell

Traits

ProofBorrow

A trait specifying that a structure supports immutable borrowing if some proof is provided.

ProofBorrowMut

A trait specifying that a structure supports mutable borrowing if some proof is provided.

Type Definitions

ReadGuard
WriteGuard