pub struct PeerCreateKey {
pub purpose: PeerKeyPurpose,
pub key_type: Option<PeerKeyType>,
pub public_key_multibase: Option<String>,
}Expand description
Key specification for creating a did:peer
Fields§
§purpose: PeerKeyPurposePurpose of this key (Verification or Encryption)
key_type: Option<PeerKeyType>Key type to generate (required if public_key_multibase is None)
public_key_multibase: Option<String>Pre-existing public key in multibase format (z6Mk…) If None, a new key will be generated
Implementations§
Source§impl PeerCreateKey
impl PeerCreateKey
Sourcepub fn new(purpose: PeerKeyPurpose, key_type: PeerKeyType) -> Self
pub fn new(purpose: PeerKeyPurpose, key_type: PeerKeyType) -> Self
Create a new key spec for generation
Sourcepub fn from_multibase(purpose: PeerKeyPurpose, multibase: String) -> Self
pub fn from_multibase(purpose: PeerKeyPurpose, multibase: String) -> Self
Create a key spec from an existing multibase key
Trait Implementations§
Source§impl Clone for PeerCreateKey
impl Clone for PeerCreateKey
Source§fn clone(&self) -> PeerCreateKey
fn clone(&self) -> PeerCreateKey
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 moreAuto Trait Implementations§
impl Freeze for PeerCreateKey
impl RefUnwindSafe for PeerCreateKey
impl Send for PeerCreateKey
impl Sync for PeerCreateKey
impl Unpin for PeerCreateKey
impl UnsafeUnpin for PeerCreateKey
impl UnwindSafe for PeerCreateKey
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