// We are the only guard after `write()`, so we can provide immutable access to the underlying object. (No mutable references the guard can exist)
// We are the only guard after `write()`, so we can provide mutable access to the underlying object.
/// Provides read access to the underlying object, allowing multiple immutable references to it.
pub fn read<'a>(&'a self) -> Result<BfSharedMutexReadGuard<'a, T>, Box<dyn Error + 'a>> {
/// Provide write access to the underlying object, only a single mutable reference to the object exists.
pub fn write<'a>(&'a self) -> Result<BfSharedMutexWriteGuard<'a, T>, Box<dyn Error + 'a>> {
/// Obtain mutable access to the object without locking, is safe because we have mutable access.