pub struct SecureEnvironment;
Expand description
Unit struct that can be used to create and get keypairs by id
§Examples
§Generate a keypair
use secure_env::{SecureEnvironment, SecureEnvironmentOps};
let key = SecureEnvironment::generate_keypair("my-unique-id").unwrap();
§Get a keypair from the keychain
use secure_env::{SecureEnvironment, SecureEnvironmentOps};
{
SecureEnvironment::generate_keypair("my-unique-id").unwrap();
}
let key = SecureEnvironment::get_keypair_by_id("my-unique-id").unwrap();
Trait Implementations§
Source§impl Clone for SecureEnvironment
impl Clone for SecureEnvironment
Source§fn clone(&self) -> SecureEnvironment
fn clone(&self) -> SecureEnvironment
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SecureEnvironment
impl Debug for SecureEnvironment
Source§impl PartialEq for SecureEnvironment
impl PartialEq for SecureEnvironment
Source§impl SecureEnvironmentOps<Key> for SecureEnvironment
impl SecureEnvironmentOps<Key> for SecureEnvironment
fn generate_keypair( id: impl Into<String>, backed_by_biometrics: bool, ) -> SecureEnvResult<Key>
fn get_keypair_by_id(id: impl Into<String>) -> SecureEnvResult<Key>
impl Copy for SecureEnvironment
impl Eq for SecureEnvironment
impl StructuralPartialEq for SecureEnvironment
Auto Trait Implementations§
impl Freeze for SecureEnvironment
impl RefUnwindSafe for SecureEnvironment
impl Send for SecureEnvironment
impl Sync for SecureEnvironment
impl Unpin for SecureEnvironment
impl UnwindSafe for SecureEnvironment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more