Struct tinyprof::PROFILER_STATE []

pub struct PROFILER_STATE {
    // some fields omitted
}

Methods from Deref<Target=Mutex<ProfilerState>>

1.0.0fn lock(&self) -> Result<MutexGuard<T>, PoisonError<MutexGuard<T>>>

Acquires a mutex, blocking the current thread until it is able to do so.

This function will block the local thread until it is available to acquire the mutex. Upon returning, the thread is the only thread with the mutex held. An RAII guard is returned to allow scoped unlock of the lock. When the guard goes out of scope, the mutex will be unlocked.

Errors

If another user of this mutex panicked while holding the mutex, then this call will return an error once the mutex is acquired.

1.0.0fn try_lock(&self) -> Result<MutexGuard<T>, TryLockError<MutexGuard<T>>>

Attempts to acquire this lock.

If the lock could not be acquired at this time, then Err is returned. Otherwise, an RAII guard is returned. The lock will be unlocked when the guard is dropped.

This function does not block.

Errors

If another user of this mutex panicked while holding the mutex, then this call will return failure if the mutex would otherwise be acquired.

1.2.0fn is_poisoned(&self) -> bool

Determines whether the lock is poisoned.

If another thread is active, the lock can still become poisoned at any time. You should not trust a false value for program correctness without additional synchronization.

1.6.0fn into_inner(self) -> Result<T, PoisonError<T>>

Consumes this mutex, returning the underlying data.

Errors

If another user of this mutex panicked while holding the mutex, then this call will return an error instead.

1.6.0fn get_mut(&mut self) -> Result<&mut T, PoisonError<&mut T>>

Returns a mutable reference to the underlying data.

Since this call borrows the Mutex mutably, no actual locking needs to take place---the mutable borrow statically guarantees no locks exist.

Errors

If another user of this mutex panicked while holding the mutex, then this call will return an error instead.

Trait Implementations

impl Deref for PROFILER_STATE

type Target = Mutex<ProfilerState>

fn deref<'a>(&'a self) -> &'a Mutex<ProfilerState>