pub struct DIDUrl<D> where
    D: DID,
    DIDUrl<D>: Sized
{ /* private fields */ }
Expand description

A DID Url: a DID with RelativeDIDUrl components.

E.g. “did:iota:H3C2AVvLMv6gmMNam3uVAjZar3cJCwDwnZn6z3wXmqPV/path?query1=a&query2=b#fragment”

Implementations

Construct a new DIDUrl with optional RelativeDIDUrl.

Parse a DIDUrl from a string.

Returns the did.

Returns the RelativeDIDUrl.

Sets the RelativeDIDUrl.

Returns the DIDUrl fragment component.

See RelativeDIDUrl::fragment.

Sets the fragment component of the DIDUrl.

See RelativeDIDUrl::set_fragment.

Returns the DIDUrl path component.

See RelativeDIDUrl::path.

Sets the path component of the DIDUrl.

See RelativeDIDUrl::set_path.

Returns the DIDUrl query component.

See RelativeDIDUrl::query.

Sets the query component of the DIDUrl.

See RelativeDIDUrl::set_query.

Parses the DIDUrl query and returns an iterator of (key, value) pairs.

See RelativeDIDUrl::query_pairs.

Append a string representing a path, query, and/or fragment, returning a new DIDUrl.

Must begin with a valid delimiter character: ‘/’, ‘?’, ‘#’. Overwrites the existing URL segment and any following segments in order of path, query, then fragment.

I.e.

  • joining a path will overwrite the path and clear the query and fragment.
  • joining a query will overwrite the query and clear the fragment.
  • joining a fragment will only overwrite the fragment.

Construct a DIDUrl<D> from a DIDUrl<U> of a different DID method.

Workaround for lack of specialisation preventing a generic From implementation.

Fallible version of DIDUrl::from.

Maps DIDUrl<D> to DIDUrl<U> by applying a function to its DID.

Fallible version of DIDUrl::map.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

👎 Deprecated since 0.5.0:

diff chain features are slated for removal

The Corresponding Diff Type for the implemented Type.

👎 Deprecated since 0.5.0:

diff chain features are slated for removal

Finds the difference between two types; self and other and returns Self::Type

👎 Deprecated since 0.5.0:

diff chain features are slated for removal

Merges a Self::Type with Self

👎 Deprecated since 0.5.0:

diff chain features are slated for removal

Converts a diff of type Self::Type to a Self.

👎 Deprecated since 0.5.0:

diff chain features are slated for removal

Converts a type of Self to a diff of Self::Type.

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Key type for comparisons.

Returns a reference to the key.

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Calculate the base32 serialized length

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Error type if conversion fails

Check if all values are in range and return array-like struct of u5 values

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

Format this as a JSON string or pretty-JSON string based on whether the # format flag was used. Read more

Converts to this type from the input type.

Returns the argument unchanged.

Deserialize Self from a string of JSON text.

Deserialize Self from bytes of JSON text.

Deserialize Self from a [serde_json::Value].

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

Encode as base32 and write it to the supplied writer Implementations shouldn’t allocate. Read more

Convert Self to base32 vector

Encode the hex strict representing self into the result. Lower case letters are used (e.g. f9b4ca) Read more

Encode the hex strict representing self into the result. Upper case letters are used (e.g. F9B4CA) Read more

Serialize self as a string of JSON.

Serialize self as a JSON byte vector.

Serialize self as a [serde_json::Value].

Serialize self as a pretty-printed string of JSON.

Serialize self as a JSON byte vector, normalized using JSON Canonicalization Scheme (JCS). Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more