Struct ssi_dids_core::RelativeDIDURL

source ·
pub struct RelativeDIDURL(/* private fields */);
Expand description

Relative DID URL.

Implementations§

source§

impl RelativeDIDURL

source

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.

source

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.

source

pub fn as_str(&self) -> &str

Returns the relative DID URL as a string.

source

pub fn as_bytes(&self) -> &[u8]

Returns the relative DID URL as a byte string.

source

pub fn path(&self) -> &RelativePath

source

pub fn query(&self) -> Option<&Query>

source

pub fn fragment(&self) -> Option<&Fragment>

source

pub fn resolve(&self, base_id: &DID) -> DIDURLBuf

Trait Implementations§

source§

impl Debug for RelativeDIDURL

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for RelativeDIDURL

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
source§

impl Ord for RelativeDIDURL

source§

fn cmp(&self, other: &RelativeDIDURL) -> Ordering

This method returns an Ordering between self and other. Read more
source§

impl PartialEq for RelativeDIDURL

source§

fn eq(&self, other: &RelativeDIDURL) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for RelativeDIDURL

source§

fn partial_cmp(&self, other: &RelativeDIDURL) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Eq for RelativeDIDURL

source§

impl StructuralPartialEq for RelativeDIDURL

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CallHasher for T
where T: Hash + ?Sized,

source§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> WithContext for T
where T: ?Sized,

source§

fn with<C>(&self, context: C) -> Contextual<&T, C>

source§

fn into_with<C>(self, context: C) -> Contextual<T, C>