pub trait DID:
Clone
+ PartialEq
+ Eq
+ PartialOrd
+ Ord
+ Hash
+ FromStr
+ TryFrom<CoreDID>
+ Into<String>
+ Into<CoreDID>
+ AsRef<CoreDID> {
const SCHEME: &'static str = BaseDIDUrl::SCHEME;
// Provided methods
fn scheme(&self) -> &'static str { ... }
fn authority(&self) -> &str { ... }
fn method(&self) -> &str { ... }
fn method_id(&self) -> &str { ... }
fn as_str(&self) -> &str { ... }
fn into_string(self) -> String { ... }
fn join(self, value: impl AsRef<str>) -> Result<DIDUrl, Error> { ... }
fn to_url(&self) -> DIDUrl { ... }
fn into_url(self) -> DIDUrl { ... }
}
Provided Associated Constants§
Provided Methods§
Sourcefn scheme(&self) -> &'static str
fn scheme(&self) -> &'static str
Returns the DID
scheme. See DID::SCHEME
.
E.g.
"did:example:12345678" -> "did"
"did:iota:main:12345678" -> "did"
Returns the DID
authority: the method name and method-id.
E.g.
"did:example:12345678" -> "example:12345678"
"did:iota:main:12345678" -> "iota:main:12345678"
Sourcefn method(&self) -> &str
fn method(&self) -> &str
Returns the DID
method name.
E.g.
"did:example:12345678" -> "example"
"did:iota:main:12345678" -> "iota"
Sourcefn method_id(&self) -> &str
fn method_id(&self) -> &str
Returns the DID
method-specific ID.
E.g.
"did:example:12345678" -> "12345678"
"did:iota:main:12345678" -> "main:12345678"
Sourcefn into_string(self) -> String
fn into_string(self) -> String
Consumes the DID
and returns its serialization.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.