#[non_exhaustive]pub enum DIDMethod {
Key {
identifier: String,
codec: Codec,
key_bytes: Vec<u8>,
},
Peer {
identifier: String,
numalgo: PeerNumAlgo,
},
Web {
identifier: String,
domain: String,
path_segments: Vec<String>,
},
Jwk {
identifier: String,
},
Ethr {
identifier: String,
},
Pkh {
identifier: String,
chain_namespace: String,
chain_reference: String,
account_address: String,
},
Webvh {
identifier: String,
scid: String,
domain: String,
path_segments: Vec<String>,
},
Cheqd {
identifier: String,
network: String,
uuid: String,
},
Scid {
identifier: String,
underlying_method: String,
version: String,
scid: String,
},
Ebsi {
identifier: String,
},
Other {
method: String,
identifier: String,
},
}Expand description
DID method identifiers per W3C DID Core 1.0
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Key
Fields
Peer
Web
Fields
Jwk
Ethr
Ethereum DID method (did:ethr)
Pkh
Public Key Hash DID method (did:pkh) Format: <chain_namespace>:<chain_reference>:<account_address>
Fields
Webvh
WebVH DID method with versioned history (did:webvh)
Format:
Fields
Cheqd
Cheqd DID method (did:cheqd)
Format:
Fields
Scid
SCID DID method - maps to other methods (did:scid)
Format: <underlying_method>:
Fields
Ebsi
EBSI DID method for legal entities (did:ebsi) Format: z<base58btc(0x01 + 16_random_bytes)>
Other
Catch-all for methods we don’t explicitly model
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DIDMethod
impl<'de> Deserialize<'de> for DIDMethod
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
impl Eq for DIDMethod
impl StructuralPartialEq for DIDMethod
Auto Trait Implementations§
impl Freeze for DIDMethod
impl RefUnwindSafe for DIDMethod
impl Send for DIDMethod
impl Sync for DIDMethod
impl Unpin for DIDMethod
impl UnsafeUnpin for DIDMethod
impl UnwindSafe for DIDMethod
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