pub struct MethodType(/* private fields */);Expand description
The type of a verification method: an open string with constants for the types this crate
produces.
§Examples
use identity_kit::did::MethodType;
assert_eq!(MethodType::JSON_WEB_KEY_2020.as_str(), "JsonWebKey2020");
assert_eq!(MethodType::new("JsonWebKey2020"), MethodType::JSON_WEB_KEY_2020);
assert_eq!(serde_json::to_string(&MethodType::MULTIKEY)?, "\"Multikey\"");Implementations§
Source§impl MethodType
impl MethodType
Sourcepub const JSON_WEB_KEY_2020: MethodType
pub const JSON_WEB_KEY_2020: MethodType
JsonWebKey2020: publicKeyJwk material (JSON Web Signature 2020 suite).
Sourcepub const JSON_WEB_KEY: MethodType
pub const JSON_WEB_KEY: MethodType
JsonWebKey: publicKeyJwk material (Controlled Identifiers 1.0).
Sourcepub const MULTIKEY: MethodType
pub const MULTIKEY: MethodType
Multikey: publicKeyMultibase material (Controlled Identifiers 1.0).
Sourcepub const ED25519_VERIFICATION_KEY_2020: MethodType
pub const ED25519_VERIFICATION_KEY_2020: MethodType
Ed25519VerificationKey2020: publicKeyMultibase material (Ed25519 Signature 2020 suite).
Trait Implementations§
Source§impl Clone for MethodType
impl Clone for MethodType
Source§impl Debug for MethodType
impl Debug for MethodType
Source§impl<'de> Deserialize<'de> for MethodType
impl<'de> Deserialize<'de> for MethodType
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MethodType
impl Display for MethodType
impl Eq for MethodType
Source§impl From<&str> for MethodType
impl From<&str> for MethodType
Source§impl From<String> for MethodType
impl From<String> for MethodType
Source§impl Hash for MethodType
impl Hash for MethodType
Source§impl Ord for MethodType
impl Ord for MethodType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for MethodType
impl PartialEq for MethodType
Source§impl PartialEq<&str> for MethodType
impl PartialEq<&str> for MethodType
Source§impl PartialEq<str> for MethodType
impl PartialEq<str> for MethodType
Source§impl PartialOrd for MethodType
impl PartialOrd for MethodType
Source§impl Serialize for MethodType
impl Serialize for MethodType
impl StructuralPartialEq for MethodType
Auto Trait Implementations§
impl Freeze for MethodType
impl RefUnwindSafe for MethodType
impl Send for MethodType
impl Sync for MethodType
impl Unpin for MethodType
impl UnsafeUnpin for MethodType
impl UnwindSafe for MethodType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.