Struct ssi_dids_core::RelativeDIDURL
source · pub struct RelativeDIDURL(/* private fields */);
Expand description
Relative DID URL.
Implementations§
source§impl RelativeDIDURL
impl RelativeDIDURL
sourcepub fn new(data: &[u8]) -> Result<&Self, InvalidRelativeDIDURL<&[u8]>>
pub fn new(data: &[u8]) -> Result<&Self, InvalidRelativeDIDURL<&[u8]>>
Converts the input data
to a relative DID URL.
Fails if the data is not a relative DID URL according to the DID Syntax.
sourcepub unsafe fn new_unchecked(data: &[u8]) -> &Self
pub unsafe fn new_unchecked(data: &[u8]) -> &Self
Converts the input data
to a relative DID URL without validation.
§Safety
The input data
must be a relative DID URL according to the
DID Syntax.
pub fn path(&self) -> &RelativePath
pub fn query(&self) -> Option<&Query>
pub fn fragment(&self) -> Option<&Fragment>
pub fn resolve(&self, base_id: &DID) -> DIDURLBuf
Trait Implementations§
source§impl Debug for RelativeDIDURL
impl Debug for RelativeDIDURL
source§impl Hash for RelativeDIDURL
impl Hash for RelativeDIDURL
source§impl Ord for RelativeDIDURL
impl Ord for RelativeDIDURL
source§impl PartialEq for RelativeDIDURL
impl PartialEq for RelativeDIDURL
source§impl PartialOrd for RelativeDIDURL
impl PartialOrd for RelativeDIDURL
impl Eq for RelativeDIDURL
impl StructuralPartialEq for RelativeDIDURL
Auto Trait Implementations§
impl Freeze for RelativeDIDURL
impl RefUnwindSafe for RelativeDIDURL
impl Send for RelativeDIDURL
impl !Sized for RelativeDIDURL
impl Sync for RelativeDIDURL
impl Unpin for RelativeDIDURL
impl UnwindSafe for RelativeDIDURL
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> CallHasher for T
impl<T> CallHasher for T
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.