pub struct KeyManagerBuilder { /* private fields */ }Expand description
A builder for KeyManager
Implementations§
Source§impl KeyManagerBuilder
impl KeyManagerBuilder
Sourcepub fn load_from_default_storage(self) -> Self
pub fn load_from_default_storage(self) -> Self
Load keys from default storage location
Sourcepub fn load_from_path(self, path: PathBuf) -> Self
pub fn load_from_path(self, path: PathBuf) -> Self
Load keys from a specific storage path
Sourcepub fn add_secret(self, did: String, secret: Secret) -> Self
pub fn add_secret(self, did: String, secret: Secret) -> Self
Add a legacy secret
Sourcepub fn add_signing_key(self, key: Arc<dyn SigningKey + Send + Sync>) -> Self
pub fn add_signing_key(self, key: Arc<dyn SigningKey + Send + Sync>) -> Self
Add a signing key
Sourcepub fn add_encryption_key(
self,
key: Arc<dyn EncryptionKey + Send + Sync>,
) -> Self
pub fn add_encryption_key( self, key: Arc<dyn EncryptionKey + Send + Sync>, ) -> Self
Add an encryption key
Sourcepub fn add_decryption_key(
self,
key: Arc<dyn DecryptionKey + Send + Sync>,
) -> Self
pub fn add_decryption_key( self, key: Arc<dyn DecryptionKey + Send + Sync>, ) -> Self
Add a decryption key
Sourcepub fn add_verification_key(
self,
key: Arc<dyn VerificationKey + Send + Sync>,
) -> Self
pub fn add_verification_key( self, key: Arc<dyn VerificationKey + Send + Sync>, ) -> Self
Add a verification key
Sourcepub fn with_auto_generated_ed25519_key(self, kid: &str) -> Result<Self>
pub fn with_auto_generated_ed25519_key(self, kid: &str) -> Result<Self>
Add an auto-generated Ed25519 key
Sourcepub fn build(self) -> Result<DefaultKeyManager>
pub fn build(self) -> Result<DefaultKeyManager>
Build the KeyManager
Trait Implementations§
Source§impl Clone for KeyManagerBuilder
impl Clone for KeyManagerBuilder
Source§fn clone(&self) -> KeyManagerBuilder
fn clone(&self) -> KeyManagerBuilder
Returns a duplicate 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 KeyManagerBuilder
impl Debug for KeyManagerBuilder
Auto Trait Implementations§
impl Freeze for KeyManagerBuilder
impl !RefUnwindSafe for KeyManagerBuilder
impl Send for KeyManagerBuilder
impl Sync for KeyManagerBuilder
impl Unpin for KeyManagerBuilder
impl UnsafeUnpin for KeyManagerBuilder
impl !UnwindSafe for KeyManagerBuilder
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