Crate hv_guarded_borrow

Crate hv_guarded_borrow 

Source
Expand description

Heavy Guarded-Borrow - traits for generalizing over guarded borrow operations

Using these traits allows you to write code which generalizes over the type of “guard” that a type like Mutex, RwLock, RefCell, AtomicRefCell, etc. may return.

Traits§

NonBlockingGuardedBorrow
Abstracts over non-blocking guarded immutable borrows (for example, RefCell::try_borrow.)
NonBlockingGuardedBorrowMut
Abstracts over non-blocking guarded mutable borrows from behind immutable references (for example, RefCell::try_borrow_mut.)
NonBlockingGuardedMutBorrowMut
Abstracts over non-blocking guarded mutable borrows from behind mutable references (for example, RefCell::get_mut, or calling .write() on an &mut Arc<RwLock<T>>.)