Struct cpuprofiler::PROFILER []

pub struct PROFILER {
    // some fields omitted
}

Methods from __Deref<Target=Mutex<Profiler>>

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.

The exact behavior on locking a mutex in the thread which already holds the lock is left unspecified. However, this function will not return on the second call (it might panic or deadlock, for example).

Errors

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

Panics

This function might panic when called if the lock is already held by the current thread.

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.

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.

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.

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

The resulting type after dereferencing

The method called to dereference a value