[−][src]Struct parking_monitor::Monitor
Methods
impl<T> Monitor<T>
[src]
pub fn new(t: T) -> Self
[src]
pub fn lock(&self) -> MonitorGuard<T>
[src]
pub fn try_lock(&self) -> Option<MonitorGuard<T>>
[src]
pub fn try_lock_for(&self, timeout: Duration) -> Option<MonitorGuard<T>>
[src]
pub fn try_lock_until(&self, timeout: Instant) -> Option<MonitorGuard<T>>
[src]
pub fn with_lock<U, F>(&self, f: F) -> U where
F: FnOnce(MonitorGuard<T>) -> U,
[src]
F: FnOnce(MonitorGuard<T>) -> U,
pub fn try_with_lock<U, F>(&self, f: F) -> Option<U> where
F: FnOnce(MonitorGuard<T>) -> U,
[src]
F: FnOnce(MonitorGuard<T>) -> U,
pub fn try_with_lock_for<U, F>(&self, timeout: Duration, f: F) -> Option<U> where
F: FnOnce(MonitorGuard<T>) -> U,
[src]
F: FnOnce(MonitorGuard<T>) -> U,
pub fn try_with_lock_until<U, F>(&self, timeout: Instant, f: F) -> Option<U> where
F: FnOnce(MonitorGuard<T>) -> U,
[src]
F: FnOnce(MonitorGuard<T>) -> U,
pub fn into_inner(self) -> T
[src]
pub fn get_mut(&mut self) -> &mut T
[src]
pub unsafe fn raw(&self) -> &RawMutex
[src]
pub unsafe fn force_unlock(&self)
[src]
pub unsafe fn force_unlock_fair(&self)
[src]
Trait Implementations
impl<T: Default> Default for Monitor<T>
[src]
impl<T> From<T> for Monitor<T>
[src]
impl<T: Debug> Debug for Monitor<T>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.