pub struct Did { /* private fields */ }Expand description
A parsed DID (did:key method).
Implementations§
Source§impl Did
impl Did
Sourcepub fn new(public_key: VerifyingKey) -> Did
pub fn new(public_key: VerifyingKey) -> Did
Create a new DID from a public key.
Sourcepub fn public_key_bytes(&self) -> &[u8; 32]
pub fn public_key_bytes(&self) -> &[u8; 32]
Get the public key bytes.
Sourcepub fn public_key(&self) -> Result<VerifyingKey, Error>
pub fn public_key(&self) -> Result<VerifyingKey, Error>
Get the public key.
Trait Implementations§
impl Eq for Did
impl StructuralPartialEq for Did
Auto Trait Implementations§
impl Freeze for Did
impl RefUnwindSafe for Did
impl Send for Did
impl Sync for Did
impl Unpin for Did
impl UnwindSafe for Did
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