openpgp-card-sequoia: add Card<Open>::into_card()
This commit is contained in:
parent
06cb246a79
commit
7c42ec4d5e
1 changed files with 9 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2021-2022 Heiko Schaefer <heiko@schaefer.name>
|
||||
// SPDX-FileCopyrightText: 2021-2023 Heiko Schaefer <heiko@schaefer.name>
|
||||
// SPDX-License-Identifier: MIT OR Apache-2.0
|
||||
|
||||
//! This crate offers ergonomic abstractions to use
|
||||
|
@ -207,6 +207,14 @@ impl Card<Open> {
|
|||
|
||||
Card::<Transaction>::new(opt)
|
||||
}
|
||||
|
||||
/// Get the internal `CardBackend`.
|
||||
///
|
||||
/// This is useful to perform operations on the card with a different crate,
|
||||
/// e.g. `yubikey-management`.
|
||||
pub fn into_card(self) -> Box<dyn CardBackend + Send + Sync> {
|
||||
self.state.pgp.into_card()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Card<Transaction<'a>> {
|
||||
|
|
Loading…
Reference in a new issue