Struct did_url_parser::DID
source · pub struct DID { /* private fields */ }
Expand description
A Decentralized Identifier (DID).
Implementations§
source§impl DID
impl DID
sourcepub const fn inspect(&self) -> Inspect<'_>
pub const fn inspect(&self) -> Inspect<'_>
Returns a wrapped DID
with a more detailed Debug
implementation.
sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the DID
and returns the serialization.
sourcepub const fn scheme(&self) -> &'static str
pub const fn scheme(&self) -> &'static str
Returns the DID
scheme. See DID::SCHEME
.
Returns the DID
authority.
sourcepub fn query_pairs(&self) -> Parse<'_>
pub fn query_pairs(&self) -> Parse<'_>
Parses the DID
query and returns an iterator of (key, value) pairs.
sourcepub fn set_method(&mut self, value: impl AsRef<str>)
pub fn set_method(&mut self, value: impl AsRef<str>)
Change the method of the DID
.
sourcepub fn set_method_id(&mut self, value: impl AsRef<str>)
pub fn set_method_id(&mut self, value: impl AsRef<str>)
Change the method-specific-id of the DID
.
sourcepub fn set_query(&mut self, value: Option<&str>)
pub fn set_query(&mut self, value: Option<&str>)
Change the query of the DID
.
No serialization is performed.
sourcepub fn set_fragment(&mut self, value: Option<&str>)
pub fn set_fragment(&mut self, value: Option<&str>)
Change the fragment of the DID
.
No serialization is performed.
Trait Implementations§
source§impl Ord for DID
impl Ord for DID
source§impl PartialEq<&str> for DID
impl PartialEq<&str> for DID
source§impl PartialEq for DID
impl PartialEq for DID
source§impl PartialOrd for DID
impl PartialOrd for DID
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for DID
Auto Trait Implementations§
impl Freeze for DID
impl RefUnwindSafe for DID
impl Send for DID
impl Sync for DID
impl Unpin for DID
impl UnwindSafe for DID
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