[−][src]Struct did_url::DID
A Decentralized Identifier (DID).
Implementations
impl DID
[src]
pub const SCHEME: &'static str
[src]
The URL scheme for Decentralized Identifiers.
pub fn parse(input: impl AsRef<str>) -> Result<Self>
[src]
pub const fn inspect(&self) -> Inspect<'_>
[src]
Returns a wrapped DID
with a more detailed Debug
implementation.
pub fn as_str(&self) -> &str
[src]
pub fn into_string(self) -> String
[src]
Consumes the DID
and returns the serialization.
pub const fn scheme(&self) -> &'static str
[src]
Returns the DID
scheme. See DID::SCHEME
.
pub fn authority(&self) -> &str
[src]
Returns the DID
authority.
pub fn method(&self) -> &str
[src]
Returns the DID
method name.
pub fn method_id(&self) -> &str
[src]
Returns the DID
method-specific ID.
pub fn path(&self) -> &str
[src]
Returns the DID
path.
pub fn query(&self) -> Option<&str>
[src]
Returns the DID
method query, if any.
pub fn fragment(&self) -> Option<&str>
[src]
Returns the DID
method fragment, if any.
pub fn query_pairs(&self) -> Parse<'_>
[src]
Parses the DID
query and returns an iterator of (key, value) pairs.
pub fn set_method(&mut self, value: impl AsRef<str>)
[src]
Change the method of the DID
.
pub fn set_method_id(&mut self, value: impl AsRef<str>)
[src]
Change the method-specific-id of the DID
.
pub fn set_path(&mut self, value: impl AsRef<str>)
[src]
Change the path of the DID
.
pub fn set_query(&mut self, value: Option<&str>)
[src]
Change the query of the DID
.
No serialization is performed.
pub fn set_fragment(&mut self, value: Option<&str>)
[src]
Change the fragment of the DID
.
No serialization is performed.
pub fn join(&self, other: impl AsRef<str>) -> Result<Self>
[src]
Trait Implementations
impl AsRef<str> for DID
[src]
impl Clone for DID
[src]
impl Debug for DID
[src]
impl Display for DID
[src]
impl Eq for DID
[src]
impl From<DID> for String
[src]
impl FromStr for DID
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(string: &str) -> Result<Self, Self::Err>
[src]
impl Hash for DID
[src]
fn hash<H>(&self, hasher: &mut H) where
H: Hasher,
[src]
H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for DID
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'_> PartialEq<&'_ str> for DID
[src]
impl PartialEq<DID> for DID
[src]
impl PartialEq<str> for DID
[src]
impl PartialOrd<DID> for DID
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl TryFrom<String> for DID
[src]
Auto Trait Implementations
impl RefUnwindSafe for DID
impl Send for DID
impl Sync for DID
impl Unpin for DID
impl UnwindSafe for DID
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,