pub struct KeyStore { /* private fields */ }Implementations§
Source§impl KeyStore
impl KeyStore
Sourcepub fn load_or_generate(path: &Path) -> Result<Identity, KeyStoreError>
pub fn load_or_generate(path: &Path) -> Result<Identity, KeyStoreError>
Load an identity or create it if it doesn’t exist.
Sourcepub fn open(path: &Path) -> Result<Self, KeyStoreError>
pub fn open(path: &Path) -> Result<Self, KeyStoreError>
Open an existing keystore at a specific path.
Sourcepub fn rotate(&mut self) -> Result<(), KeyStoreError>
pub fn rotate(&mut self) -> Result<(), KeyStoreError>
Rotate the identity by archiving the current key and generating a new one.
Sourcepub fn list_public_keys(&self) -> Vec<PublicKey>
pub fn list_public_keys(&self) -> Vec<PublicKey>
Return all known public keys, including archived ones.
Auto Trait Implementations§
impl Freeze for KeyStore
impl RefUnwindSafe for KeyStore
impl Send for KeyStore
impl Sync for KeyStore
impl Unpin for KeyStore
impl UnwindSafe for KeyStore
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