diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2019-01-27 15:43:32 +0000 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2019-07-08 21:27:11 +0000 |
commit | 588066f415e956fdcd2c6f6216c52b25911a3b1d (patch) | |
tree | b16014285812bf8286a6f76800c978f8da864486 /README.md | |
parent | a52676d9577f587e0f4d8e47ddc71ba34f0b31ca (diff) | |
download | nitrokey-rs-588066f415e956fdcd2c6f6216c52b25911a3b1d.tar.gz nitrokey-rs-588066f415e956fdcd2c6f6216c52b25911a3b1d.tar.bz2 |
Add Manager struct to manage Nitrokey connections
As part of the connection refactoring, we introduce the Manager struct
that deals with connection management. To make sure there can be only
once instance of the manager, we add a global static Mutex that holds
the single Manager instance. We use the struct to ensure that the user
can only connect to one device at a time.
This also changes the Error::PoisonError variant to store the
sync::PoisonError. This allows the user to call into_inner on the
PoisonError to retrieve the MutexGuard and to ignore the error (for
example useful during testing).
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions