iri_string::types

Struct RiFragmentString

source
pub struct RiFragmentString<S> { /* private fields */ }
Available on crate feature alloc only.
Expand description

An owned string of an IRI fragment (i.e. after the first # character).

This corresponds to ifragment rule in RFC 3987 (and fragment rule in RFC 3986). The rule for absolute-IRI is *( ipchar / "/" / "?" ).

For details, see the documentation for RiFragmentStr.

Enabled by alloc or std feature.

Implementations§

source§

impl<S: Spec> RiFragmentString<S>

source

pub unsafe fn new_unchecked(s: String) -> Self

Creates a new string without validation.

This does not validate the given string, so it is caller’s responsibility to ensure the given string is valid.

§Safety

The given string must be syntactically valid as Self type. If not, any use of the returned value or the call of this function itself may result in undefined behavior.

source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the inner buffer to match its length.

source

pub fn capacity(&self) -> usize

Returns the internal buffer capacity in bytes.

source

pub fn as_slice(&self) -> &RiFragmentStr<S>

Returns the borrowed IRI string slice.

This is equivalent to &*self.

source§

impl RiFragmentString<IriSpec>

Conversion from an IRI into a URI.

source

pub fn encode_to_uri_inline(&mut self)

Percent-encodes the IRI into a valid URI that identifies the equivalent resource.

After the encode, the IRI is also a valid URI.

If you want a new URI string rather than modifying the IRI string, or if you need more precise control over memory allocation and buffer handling, use encode_to_uri method.

§Panics

Panics if the memory allocation failed.

§Examples
#[cfg(feature = "alloc")] {
use iri_string::types::IriFragmentString;

let mut iri = IriFragmentString::try_from("alpha-is-\u{03B1}")?;
iri.encode_to_uri_inline();
assert_eq!(iri, "alpha-is-%CE%B1");
source

pub fn try_encode_to_uri_inline(&mut self) -> Result<(), TryReserveError>

Percent-encodes the IRI into a valid URI that identifies the equivalent resource.

After the encode, the IRI is also a valid URI.

If you want a new URI string rather than modifying the IRI string, or if you need more precise control over memory allocation and buffer handling, use encode_to_uri method.

§Examples
#[cfg(feature = "alloc")] {
use iri_string::types::IriFragmentString;

let mut iri = IriFragmentString::try_from("alpha-is-\u{03B1}")?;
iri.try_encode_to_uri_inline()
    .expect("failed to allocate memory");
assert_eq!(iri, "alpha-is-%CE%B1");
source

pub fn encode_into_uri(self) -> UriFragmentString

Percent-encodes the IRI into a valid URI that identifies the equivalent resource.

If you want a new URI string rather than modifying the IRI string, or if you need more precise control over memory allocation and buffer handling, use encode_to_uri method.

§Examples
#[cfg(feature = "alloc")] {
use iri_string::types::{IriFragmentString, UriFragmentString};

let iri = IriFragmentString::try_from("alpha-is-\u{03B1}")?;
// Type annotation here is not necessary.
let uri: UriFragmentString = iri.encode_into_uri();
assert_eq!(uri, "alpha-is-%CE%B1");
source

pub fn try_encode_into_uri(self) -> Result<UriFragmentString, TryReserveError>

Percent-encodes the IRI into a valid URI that identifies the equivalent resource.

If you want a new URI string rather than modifying the IRI string, or if you need more precise control over memory allocation and buffer handling, use encode_to_uri method.

§Examples
#[cfg(feature = "alloc")] {
use iri_string::types::{IriFragmentString, UriFragmentString};

let iri = IriFragmentString::try_from("alpha-is-\u{03B1}")?;
// Type annotation here is not necessary.
let uri: UriFragmentString = iri.try_encode_into_uri()
    .expect("failed to allocate memory");
assert_eq!(uri, "alpha-is-%CE%B1");
source

pub fn try_into_uri(self) -> Result<UriFragmentString, IriFragmentString>

Converts an IRI into a URI without modification, if possible.

§Examples
use iri_string::types::{IriFragmentString, UriFragmentString};

let ascii_iri = IriFragmentString::try_from("alpha-is-%CE%B1")?;
assert_eq!(
    ascii_iri.try_into_uri().map(|uri| uri.to_string()),
    Ok("alpha-is-%CE%B1".to_string())
);

let nonascii_iri = IriFragmentString::try_from("alpha-is-\u{03B1}")?;
assert_eq!(
    nonascii_iri.try_into_uri().map_err(|iri| iri.to_string()),
    Err("alpha-is-\u{03B1}".to_string())
);

Methods from Deref<Target = RiFragmentStr<S>>§

source

pub fn as_str(&self) -> &str

Returns &str.

source

pub fn len(&self) -> usize

Returns the string length.

source

pub fn is_empty(&self) -> bool

Returns whether the string is empty.

source

pub fn encode_to_uri(&self) -> MappedToUri<'_, Self>

Percent-encodes the IRI into a valid URI that identifies the equivalent resource.

If you need more precise control over memory allocation and buffer handling, use MappedToUri type.

§Examples
use iri_string::format::ToDedicatedString;
use iri_string::types::{IriFragmentStr, UriFragmentString};

let iri = IriFragmentStr::new("alpha-is-\u{03B1}")?;
// Type annotation here is not necessary.
let uri: UriFragmentString = iri.encode_to_uri().to_dedicated_string();
assert_eq!(uri, "alpha-is-%CE%B1");
source

pub fn as_uri(&self) -> Option<&UriFragmentStr>

Converts an IRI into a URI without modification, if possible.

This is semantically equivalent to UriFragmentStr::new(self.as_str()).ok().

§Examples
use iri_string::types::{IriFragmentStr, UriFragmentStr};

let ascii_iri = IriFragmentStr::new("alpha-is-%CE%B1")?;
assert_eq!(
    ascii_iri.as_uri().map(AsRef::as_ref),
    Some("alpha-is-%CE%B1")
);

let nonascii_iri = IriFragmentStr::new("alpha-is-\u{03B1}")?;
assert_eq!(nonascii_iri.as_uri(), None);

Trait Implementations§

source§

impl<S: Spec> AsRef<RiFragmentStr<S>> for RiFragmentString<S>

source§

fn as_ref(&self) -> &RiFragmentStr<S>

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

impl<S: Spec> AsRef<str> for RiFragmentString<S>

source§

fn as_ref(&self) -> &str

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

impl<S: Spec> Borrow<RiFragmentStr<S>> for RiFragmentString<S>

source§

fn borrow(&self) -> &RiFragmentStr<S>

Immutably borrows from an owned value. Read more
source§

impl<S: Spec> Borrow<str> for RiFragmentString<S>

source§

fn borrow(&self) -> &str

Immutably borrows from an owned value. Read more
source§

impl<S: Spec> Clone for RiFragmentString<S>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<S: Spec> Debug for RiFragmentString<S>

source§

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

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

impl<S: Spec> Deref for RiFragmentString<S>

source§

type Target = RiFragmentStr<S>

The resulting type after dereferencing.
source§

fn deref(&self) -> &RiFragmentStr<S>

Dereferences the value.
source§

impl<'de, S: Spec> Deserialize<'de> for RiFragmentString<S>

Available on crate feature serde only.
source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<S: Spec> Display for RiFragmentString<S>

source§

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

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

impl<S: Spec> From<&RiFragmentStr<S>> for RiFragmentString<S>

source§

fn from(s: &RiFragmentStr<S>) -> Self

Converts to this type from the input type.
source§

impl<'a, S: Spec> From<&'a RiFragmentString<S>> for MappedToUri<'a, RiFragmentStr<S>>

source§

fn from(iri: &'a RiFragmentString<S>) -> Self

Converts to this type from the input type.
source§

impl<S: Spec> From<RiFragmentString<S>> for Box<RiFragmentStr<S>>

source§

fn from(s: RiFragmentString<S>) -> Box<RiFragmentStr<S>>

Converts to this type from the input type.
source§

impl<'a, S: Spec> From<RiFragmentString<S>> for Cow<'a, RiFragmentStr<S>>

source§

fn from(s: RiFragmentString<S>) -> Cow<'a, RiFragmentStr<S>>

Converts to this type from the input type.
source§

impl<S: Spec> From<RiFragmentString<S>> for String

source§

fn from(s: RiFragmentString<S>) -> Self

Converts to this type from the input type.
source§

impl From<RiFragmentString<UriSpec>> for IriFragmentString

source§

fn from(uri: UriFragmentString) -> Self

Converts to this type from the input type.
source§

impl<S: Spec> FromStr for RiFragmentString<S>

source§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

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

impl<S: Spec> Hash for RiFragmentString<S>

source§

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

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

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

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

impl<S: Spec> Ord for RiFragmentString<S>

source§

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

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

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
source§

impl<S: Spec, T: Spec> PartialEq<&RiFragmentStr<S>> for RiFragmentString<T>

source§

fn eq(&self, o: &&RiFragmentStr<S>) -> 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<S: Spec> PartialEq<&str> for RiFragmentString<S>

source§

fn eq(&self, o: &&str) -> 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<S: Spec, T: Spec> PartialEq<Cow<'_, RiFragmentStr<S>>> for RiFragmentString<T>

source§

fn eq(&self, o: &Cow<'_, RiFragmentStr<S>>) -> 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<S: Spec> PartialEq<Cow<'_, str>> for RiFragmentString<S>

source§

fn eq(&self, o: &Cow<'_, str>) -> 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<S: Spec, T: Spec> PartialEq<RiFragmentStr<S>> for RiFragmentString<T>

source§

fn eq(&self, o: &RiFragmentStr<S>) -> 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<S: Spec> PartialEq<RiFragmentString<S>> for &str

source§

fn eq(&self, o: &RiFragmentString<S>) -> 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<S: Spec> PartialEq<RiFragmentString<S>> for Cow<'_, str>

source§

fn eq(&self, o: &RiFragmentString<S>) -> 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<S: Spec> PartialEq<RiFragmentString<S>> for String

source§

fn eq(&self, o: &RiFragmentString<S>) -> 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<S: Spec> PartialEq<RiFragmentString<S>> for str

source§

fn eq(&self, o: &RiFragmentString<S>) -> 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<S: Spec, T: Spec> PartialEq<RiFragmentString<T>> for &RiFragmentStr<S>

source§

fn eq(&self, o: &RiFragmentString<T>) -> 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<S: Spec, T: Spec> PartialEq<RiFragmentString<T>> for Cow<'_, RiFragmentStr<S>>

source§

fn eq(&self, o: &RiFragmentString<T>) -> 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<S: Spec, T: Spec> PartialEq<RiFragmentString<T>> for RiFragmentStr<S>

source§

fn eq(&self, o: &RiFragmentString<T>) -> 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<S: Spec, T: Spec> PartialEq<RiFragmentString<T>> for RiFragmentString<S>

source§

fn eq(&self, other: &RiFragmentString<T>) -> 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<S: Spec> PartialEq<String> for RiFragmentString<S>

source§

fn eq(&self, o: &String) -> 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<S: Spec> PartialEq<str> for RiFragmentString<S>

source§

fn eq(&self, o: &str) -> 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<S: Spec, T: Spec> PartialOrd<&RiFragmentStr<S>> for RiFragmentString<T>

source§

fn partial_cmp(&self, o: &&RiFragmentStr<S>) -> 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<S: Spec> PartialOrd<&str> for RiFragmentString<S>

source§

fn partial_cmp(&self, o: &&str) -> 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<S: Spec, T: Spec> PartialOrd<Cow<'_, RiFragmentStr<S>>> for RiFragmentString<T>

source§

fn partial_cmp(&self, o: &Cow<'_, RiFragmentStr<S>>) -> 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<S: Spec> PartialOrd<Cow<'_, str>> for RiFragmentString<S>

source§

fn partial_cmp(&self, o: &Cow<'_, str>) -> 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<S: Spec, T: Spec> PartialOrd<RiFragmentStr<S>> for RiFragmentString<T>

source§

fn partial_cmp(&self, o: &RiFragmentStr<S>) -> 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<S: Spec> PartialOrd<RiFragmentString<S>> for &str

source§

fn partial_cmp(&self, o: &RiFragmentString<S>) -> 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<S: Spec> PartialOrd<RiFragmentString<S>> for Cow<'_, str>

source§

fn partial_cmp(&self, o: &RiFragmentString<S>) -> 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<S: Spec> PartialOrd<RiFragmentString<S>> for String

source§

fn partial_cmp(&self, o: &RiFragmentString<S>) -> 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<S: Spec> PartialOrd<RiFragmentString<S>> for str

source§

fn partial_cmp(&self, o: &RiFragmentString<S>) -> 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<S: Spec, T: Spec> PartialOrd<RiFragmentString<T>> for &RiFragmentStr<S>

source§

fn partial_cmp(&self, o: &RiFragmentString<T>) -> 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<S: Spec, T: Spec> PartialOrd<RiFragmentString<T>> for Cow<'_, RiFragmentStr<S>>

source§

fn partial_cmp(&self, o: &RiFragmentString<T>) -> 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<S: Spec, T: Spec> PartialOrd<RiFragmentString<T>> for RiFragmentStr<S>

source§

fn partial_cmp(&self, o: &RiFragmentString<T>) -> 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<S: Spec, T: Spec> PartialOrd<RiFragmentString<T>> for RiFragmentString<S>

source§

fn partial_cmp(&self, other: &RiFragmentString<T>) -> 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<S: Spec> PartialOrd<String> for RiFragmentString<S>

source§

fn partial_cmp(&self, o: &String) -> 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<S: Spec> PartialOrd<str> for RiFragmentString<S>

source§

fn partial_cmp(&self, o: &str) -> 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<S> Serialize for RiFragmentString<S>
where S: Spec,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<S: Spec> TryFrom<&[u8]> for RiFragmentString<S>

source§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(bytes: &[u8]) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<S: Spec> TryFrom<&str> for RiFragmentString<S>

source§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(s: &str) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<S: Spec> TryFrom<String> for RiFragmentString<S>

source§

type Error = CreationError<String>

The type returned in the event of a conversion error.
source§

fn try_from(s: String) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<S: Spec> Eq for RiFragmentString<S>

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T> ToStringFallible for T
where T: Display,

source§

fn try_to_string(&self) -> Result<String, TryReserveError>

Available on crate feature alloc only.

ToString::to_string, but without panic on OOM.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,