pub struct RwLock { /* private fields */ }Implementations§
Source§impl RwLock
impl RwLock
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn read_lock(&self, mode: LockMode) -> Result<ReadGuard>
pub fn write_lock(&self, mode: LockMode) -> Result<WriteGuard>
pub fn try_read_lock(&self, mode: LockMode) -> Result<Option<ReadGuard>>
pub fn try_write_lock(&self, mode: LockMode) -> Result<Option<WriteGuard>>
pub fn reader_count(&self, mode: LockMode) -> u64
pub fn total_reader_count(&self) -> u64
pub fn has_writer(&self) -> bool
pub fn writer_mode(&self) -> Option<LockMode>
pub fn writer_pid(&self) -> Option<u64>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RwLock
impl RefUnwindSafe for RwLock
impl Send for RwLock
impl Sync for RwLock
impl Unpin for RwLock
impl UnwindSafe for RwLock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more