[−][src]Function nitrokey::take
pub fn take() -> Result<MutexGuard<'static, Manager>, Error>
Try to take an instance of the connection manager.
There may only be one Manager
instance at the same time. If there already is an
instance, a ConcurrentAccessError
is returned. If you want a blocking version, use
take_blocking
. If you want to access the manager instance even if the cache is poisoned,
use force_take
.
Errors
ConcurrentAccessError
if the token for theManager
instance cannot be lockedPoisonError
if the lock is poisoned