pub struct MutexRef<'a> { /* private fields */ }
Available on crate feature
unstable
only.Expand description
A borrowed reference to a mutex.
Implementations§
Source§impl MutexRef<'_>
§Object ID conversion
impl MutexRef<'_>
§Object ID conversion
Sourcepub const unsafe fn from_raw_nonnull(id: NonNullID) -> Self
pub const unsafe fn from_raw_nonnull(id: NonNullID) -> Self
Sourcepub const fn as_raw_nonnull(self) -> NonNullID
pub const fn as_raw_nonnull(self) -> NonNullID
Get the raw object ID as abi::NonNullID
.
Source§impl MutexRef<'_>
§Mutex Operations
impl MutexRef<'_>
§Mutex Operations
Sourcepub fn lock_timeout(self, tmo: Timeout) -> Result<(), Error<LockTimeoutError>>
pub fn lock_timeout(self, tmo: Timeout) -> Result<(), Error<LockTimeoutError>>
tloc_mtx
: Lock the mutex with timeout.
Sourcepub fn try_lock(self) -> Result<(), Error<TryLockError>>
pub fn try_lock(self) -> Result<(), Error<TryLockError>>
ploc_mtx
: Attempt to lock the mutex. Returns immediately if it’s
already locked.
Sourcepub fn initialize(self) -> Result<(), Error<InitializeError>>
pub fn initialize(self) -> Result<(), Error<InitializeError>>
ini_mtx
: Initialize the mutex.
Trait Implementations§
impl<'a> Copy for MutexRef<'a>
impl<'a> Eq for MutexRef<'a>
impl<'a> StructuralPartialEq for MutexRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for MutexRef<'a>
impl<'a> RefUnwindSafe for MutexRef<'a>
impl<'a> Send for MutexRef<'a>
impl<'a> Sync for MutexRef<'a>
impl<'a> Unpin for MutexRef<'a>
impl<'a> UnwindSafe for MutexRef<'a>
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