pub struct VerificationMethodMap {
pub id: String,
pub method_type: String,
pub controller: String,
pub material: VerificationMaterial,
}Expand description
A verification method map (spec Section 5.2).
Deserializing refuses a method with no verification material property or with more than one, so two readers of the same document never pick different keys.
Fields§
§id: StringDID URL of this method, <did>#<fragment>.
method_type: StringMultikey or JsonWebKey.
controller: StringThe DID that controls this method.
material: VerificationMaterialThe verification material property.
Implementations§
Source§impl VerificationMethodMap
impl VerificationMethodMap
Sourcepub fn multikey(
id: String,
controller: String,
codec: KeyCodec,
key: &[u8],
) -> Result<Self, Error>
pub fn multikey( id: String, controller: String, codec: KeyCodec, key: &[u8], ) -> Result<Self, Error>
Build a Multikey verification method from raw key bytes.
Sourcepub fn ml_dsa_87(
id: String,
controller: String,
key: &[u8],
) -> Result<Self, Error>
pub fn ml_dsa_87( id: String, controller: String, key: &[u8], ) -> Result<Self, Error>
Build the JsonWebKey verification method for an ML-DSA-87 key.
Trait Implementations§
Source§impl Clone for VerificationMethodMap
impl Clone for VerificationMethodMap
Source§impl Debug for VerificationMethodMap
impl Debug for VerificationMethodMap
Source§impl<'de> Deserialize<'de> for VerificationMethodMap
impl<'de> Deserialize<'de> for VerificationMethodMap
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for VerificationMethodMap
impl PartialEq for VerificationMethodMap
Source§impl Serialize for VerificationMethodMap
impl Serialize for VerificationMethodMap
impl StructuralPartialEq for VerificationMethodMap
Auto Trait Implementations§
impl Freeze for VerificationMethodMap
impl RefUnwindSafe for VerificationMethodMap
impl Send for VerificationMethodMap
impl Sync for VerificationMethodMap
impl Unpin for VerificationMethodMap
impl UnsafeUnpin for VerificationMethodMap
impl UnwindSafe for VerificationMethodMap
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