iri_string::types

Struct RiString

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

An owned string of an absolute IRI possibly with fragment part.

This corresponds to IRI rule in RFC 3987 (and URI rule in RFC 3986). The rule for IRI is scheme ":" ihier-part [ "?" iquery ] [ "#" ifragment ]. In other words, this is RiAbsoluteString with fragment part allowed.

For details, see the document for RiStr.

Enabled by alloc or std feature.

Implementations§

source§

impl<S: Spec> RiString<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) -> &RiStr<S>

Returns the borrowed IRI string slice.

This is equivalent to &*self.

source§

impl<S: Spec> RiString<S>

source

pub fn into_absolute_and_fragment( self, ) -> (RiAbsoluteString<S>, Option<RiFragmentString<S>>)

Splits the IRI into an absolute IRI part and a fragment part.

A leading # character is truncated if the fragment part exists.

§Examples
use std::convert::TryFrom;
let iri = "foo://bar/baz?qux=quux#corge".parse::<IriString>()?;
let (absolute, fragment) = iri.into_absolute_and_fragment();
let fragment_expected = IriFragmentString::try_from("corge".to_owned())
    .map_err(|e| e.validation_error())?;
assert_eq!(absolute, "foo://bar/baz?qux=quux");
assert_eq!(fragment, Some(fragment_expected));
use std::convert::TryFrom;
let iri = "foo://bar/baz?qux=quux#".parse::<IriString>()?;
let (absolute, fragment) = iri.into_absolute_and_fragment();
let fragment_expected = IriFragmentString::try_from("".to_owned())
    .map_err(|e| e.validation_error())?;
assert_eq!(absolute, "foo://bar/baz?qux=quux");
assert_eq!(fragment, Some(fragment_expected));
use std::convert::TryFrom;
let iri = "foo://bar/baz?qux=quux".parse::<IriString>()?;
let (absolute, fragment) = iri.into_absolute_and_fragment();
assert_eq!(absolute, "foo://bar/baz?qux=quux");
assert_eq!(fragment, None);
source

pub fn into_absolute(self) -> RiAbsoluteString<S>

Strips the fragment part if exists, and returns an RiAbsoluteString.

§Examples
let iri = "foo://bar/baz?qux=quux#corge".parse::<IriString>()?;
assert_eq!(iri.into_absolute(), "foo://bar/baz?qux=quux");
let iri = "foo://bar/baz?qux=quux".parse::<IriString>()?;
assert_eq!(iri.into_absolute(), "foo://bar/baz?qux=quux");
source

pub fn set_fragment(&mut self, fragment: Option<&RiFragmentStr<S>>)

Sets the fragment part to the given string.

Removes fragment part (and following # character) if None is given.

source

pub fn remove_password_inline(&mut self)

Removes the password completely (including separator colon) from self even if it is empty.

§Examples
use iri_string::types::IriString;

let mut iri = IriString::try_from("http://user:password@example.com/path?query")?;
iri.remove_password_inline();
assert_eq!(iri, "http://user@example.com/path?query");

Even if the password is empty, the password and separator will be removed.

use iri_string::types::IriString;

let mut iri = IriString::try_from("http://user:@example.com/path?query")?;
iri.remove_password_inline();
assert_eq!(iri, "http://user@example.com/path?query");
source

pub fn remove_nonempty_password_inline(&mut self)

Replaces the non-empty password in self to the empty password.

This leaves the separator colon if the password part was available.

§Examples
use iri_string::types::IriString;

let mut iri = IriString::try_from("http://user:password@example.com/path?query")?;
iri.remove_nonempty_password_inline();
assert_eq!(iri, "http://user:@example.com/path?query");

If the password is empty, it is left as is.

use iri_string::types::IriString;

let mut iri = IriString::try_from("http://user:@example.com/path?query")?;
iri.remove_nonempty_password_inline();
assert_eq!(iri, "http://user:@example.com/path?query");
source§

impl RiString<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::IriString;

let mut iri = IriString::try_from("http://example.com/?alpha=\u{03B1}")?;
iri.encode_to_uri_inline();
assert_eq!(iri, "http://example.com/?alpha=%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::IriString;

let mut iri = IriString::try_from("http://example.com/?alpha=\u{03B1}")?;
iri.try_encode_to_uri_inline()
    .expect("failed to allocate memory");
assert_eq!(iri, "http://example.com/?alpha=%CE%B1");
source

pub fn encode_into_uri(self) -> UriString

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::{IriString, UriString};

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

pub fn try_encode_into_uri(self) -> Result<UriString, 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::{IriString, UriString};

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

pub fn try_into_uri(self) -> Result<UriString, IriString>

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

§Examples
use iri_string::types::{IriString, UriString};

let ascii_iri = IriString::try_from("http://example.com/?alpha=%CE%B1")?;
assert_eq!(
    ascii_iri.try_into_uri().map(|uri| uri.to_string()),
    Ok("http://example.com/?alpha=%CE%B1".to_string())
);

let nonascii_iri = IriString::try_from("http://example.com/?alpha=\u{03B1}")?;
assert_eq!(
    nonascii_iri.try_into_uri().map_err(|iri| iri.to_string()),
    Err("http://example.com/?alpha=\u{03B1}".to_string())
);

Methods from Deref<Target = RiStr<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 to_absolute_and_fragment( &self, ) -> (&RiAbsoluteStr<S>, Option<&RiFragmentStr<S>>)

Splits the IRI into an absolute IRI part and a fragment part.

A leading # character is truncated if the fragment part exists.

§Examples

If the IRI has a fragment part, Some(_) is returned.

let iri = IriStr::new("foo://bar/baz?qux=quux#corge")?;
let (absolute, fragment) = iri.to_absolute_and_fragment();
let fragment_expected = IriFragmentStr::new("corge")?;
assert_eq!(absolute, "foo://bar/baz?qux=quux");
assert_eq!(fragment, Some(fragment_expected));

When the fragment part exists but is empty string, Some(_) is returned.

let iri = IriStr::new("foo://bar/baz?qux=quux#")?;
let (absolute, fragment) = iri.to_absolute_and_fragment();
let fragment_expected = IriFragmentStr::new("")?;
assert_eq!(absolute, "foo://bar/baz?qux=quux");
assert_eq!(fragment, Some(fragment_expected));

If the IRI has no fragment, None is returned.

let iri = IriStr::new("foo://bar/baz?qux=quux")?;
let (absolute, fragment) = iri.to_absolute_and_fragment();
assert_eq!(absolute, "foo://bar/baz?qux=quux");
assert_eq!(fragment, None);
source

pub fn to_absolute(&self) -> &RiAbsoluteStr<S>

Strips the fragment part if exists, and returns &RiAbsoluteStr.

§Examples
let iri = IriStr::new("foo://bar/baz?qux=quux#corge")?;
assert_eq!(iri.to_absolute(), "foo://bar/baz?qux=quux");
let iri = IriStr::new("foo://bar/baz?qux=quux")?;
assert_eq!(iri.to_absolute(), "foo://bar/baz?qux=quux");
source

pub fn ensure_rfc3986_normalizable(&self) -> Result<(), Error>

Returns Ok(()) if the IRI is normalizable by the RFC 3986 algorithm.

§Examples
use iri_string::types::IriStr;

let iri = IriStr::new("HTTP://example.COM/foo/%2e/bar/..")?;
assert!(iri.ensure_rfc3986_normalizable().is_ok());

let iri2 = IriStr::new("scheme:/..//bar")?;
// The normalization result would be `scheme://bar` according to RFC
// 3986, but it is unintended and should be treated as a failure.
// This crate automatically handles this case so that `.normalize()` won't fail.
assert!(!iri.ensure_rfc3986_normalizable().is_err());
source

pub fn is_normalized(&self) -> bool

Returns true if the IRI is already normalized.

This returns the same result as self.normalize().to_string() == self, but does this more efficiently without heap allocation.

§Examples
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("HTTP://example.COM/foo/./bar/%2e%2e/../baz?query#fragment")?;
assert!(!iri.is_normalized());

let normalized = iri.normalize().to_dedicated_string();
assert_eq!(normalized, "http://example.com/baz?query#fragment");
assert!(normalized.is_normalized());
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("scheme:/.///foo")?;
// Already normalized.
assert!(iri.is_normalized());
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("scheme:relative/..//not-a-host")?;
// Default normalization algorithm assumes the path part to be NOT opaque.
assert!(!iri.is_normalized());

let normalized = iri.normalize().to_dedicated_string();
assert_eq!(normalized, "scheme:/.//not-a-host");
source

pub fn is_normalized_rfc3986(&self) -> bool

Returns true if the IRI is already normalized in the sense of RFC 3986.

This returns the same result as self.ensure_rfc3986_normalizable() && (self.normalize().to_string() == self), but does this more efficiently without heap allocation.

§Examples
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("HTTP://example.COM/foo/./bar/%2e%2e/../baz?query#fragment")?;
assert!(!iri.is_normalized_rfc3986());

let normalized = iri.normalize().to_dedicated_string();
assert_eq!(normalized, "http://example.com/baz?query#fragment");
assert!(normalized.is_normalized_rfc3986());
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("scheme:/.///foo")?;
// Not normalized in the sense of RFC 3986.
assert!(!iri.is_normalized_rfc3986());
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("scheme:relative/..//not-a-host")?;
// RFC 3986 normalization algorithm assumes the path part to be NOT opaque.
assert!(!iri.is_normalized_rfc3986());

let normalized = iri.normalize().to_dedicated_string();
assert_eq!(normalized, "scheme:/.//not-a-host");
source

pub fn is_normalized_but_authorityless_relative_path_preserved(&self) -> bool

Returns true if the IRI is already normalized in the sense of normalize_but_preserve_authorityless_relative_path method.

This returns the same result as self.normalize_but_preserve_authorityless_relative_path().to_string() == self, but does this more efficiently without heap allocation.

§Examples
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("HTTP://example.COM/foo/./bar/%2e%2e/../baz?query#fragment")?;
assert!(!iri.is_normalized_but_authorityless_relative_path_preserved());

let normalized = iri
    .normalize_but_preserve_authorityless_relative_path()
    .to_dedicated_string();
assert_eq!(normalized, "http://example.com/baz?query#fragment");
assert!(normalized.is_normalized());
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("scheme:/.///foo")?;
// Already normalized in the sense of
// `normalize_but_opaque_authorityless_relative_path()` method.
assert!(iri.is_normalized_but_authorityless_relative_path_preserved());
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("scheme:relative/..//not-a-host")?;
// Relative path is treated as opaque since the autority component is absent.
assert!(iri.is_normalized_but_authorityless_relative_path_preserved());
source

pub fn normalize(&self) -> Normalized<'_, Self>

Returns the normalized IRI.

§Notes

For some abnormal IRIs, the normalization can produce semantically incorrect string that looks syntactically valid. To avoid security issues by this trap, the normalization algorithm by this crate automatically applies the workaround.

If you worry about this, test by RiStr::ensure_rfc3986_normalizable method or Normalized::ensure_rfc3986_normalizable before using the result string.

§Examples
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("HTTP://example.COM/foo/./bar/%2e%2e/../baz?query#fragment")?;

let normalized = iri.normalize().to_dedicated_string();
assert_eq!(normalized, "http://example.com/baz?query#fragment");
source

pub fn normalize_but_preserve_authorityless_relative_path( &self, ) -> Normalized<'_, Self>

Returns the normalized IRI, but preserving dot segments in relative path if the authority component is absent.

This normalization would be similar to that of WHATWG URL Standard while this implementation is not guaranteed to stricly follow the spec.

Note that this normalization algorithm is not compatible with RFC 3986 algorithm for some inputs.

Note that case normalization and percent-encoding normalization will still be applied to any path.

§Examples
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("HTTP://example.COM/foo/./bar/%2e%2e/../baz?query#fragment")?;

let normalized = iri
    .normalize_but_preserve_authorityless_relative_path()
    .to_dedicated_string();
assert_eq!(normalized, "http://example.com/baz?query#fragment");
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("scheme:relative/../f%6f%6f")?;

let normalized = iri
    .normalize_but_preserve_authorityless_relative_path()
    .to_dedicated_string();
assert_eq!(normalized, "scheme:relative/../foo");
// `.normalize()` would normalize this to `scheme:/foo`.
source

pub fn mask_password(&self) -> PasswordMasked<'_, Self>

Returns the proxy to the IRI with password masking feature.

§Examples
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("http://user:password@example.com/path?query")?;
let masked = iri.mask_password();
assert_eq!(masked.to_dedicated_string(), "http://user:@example.com/path?query");

assert_eq!(
    masked.replace_password("${password}").to_string(),
    "http://user:${password}@example.com/path?query"
);
source

pub fn scheme_str(&self) -> &str

Returns the scheme.

The following colon is truncated.

§Examples
use iri_string::types::IriStr;

let iri = IriStr::new("http://example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.scheme_str(), "http");
source

pub fn authority_str(&self) -> Option<&str>

Returns the authority.

The leading // is truncated.

§Examples
use iri_string::types::IriStr;

let iri = IriStr::new("http://example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.authority_str(), Some("example.com"));
use iri_string::types::IriStr;

let iri = IriStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.authority_str(), None);
source

pub fn path_str(&self) -> &str

Returns the path.

§Examples
use iri_string::types::IriStr;

let iri = IriStr::new("http://example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.path_str(), "/pathpath");
use iri_string::types::IriStr;

let iri = IriStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.path_str(), "uuid:10db315b-fcd1-4428-aca8-15babc9a2da2");
source

pub fn query(&self) -> Option<&RiQueryStr<S>>

Returns the query.

The leading question mark (?) is truncated.

§Examples
use iri_string::types::{IriQueryStr, IriStr};

let iri = IriStr::new("http://example.com/pathpath?queryquery#fragfrag")?;
let query = IriQueryStr::new("queryquery")?;
assert_eq!(iri.query(), Some(query));
use iri_string::types::IriStr;

let iri = IriStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.query(), None);
source

pub fn query_str(&self) -> Option<&str>

Returns the query in a raw string slice.

The leading question mark (?) is truncated.

§Examples
use iri_string::types::IriStr;

let iri = IriStr::new("http://example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.query_str(), Some("queryquery"));
use iri_string::types::IriStr;

let iri = IriStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.query_str(), None);
source

pub fn fragment(&self) -> Option<&RiFragmentStr<S>>

Returns the fragment part if exists.

A leading # character is truncated if the fragment part exists.

§Examples
let iri = IriStr::new("foo://bar/baz?qux=quux#corge")?;
let fragment = IriFragmentStr::new("corge")?;
assert_eq!(iri.fragment(), Some(fragment));
let iri = IriStr::new("foo://bar/baz?qux=quux#")?;
let fragment = IriFragmentStr::new("")?;
assert_eq!(iri.fragment(), Some(fragment));
let iri = IriStr::new("foo://bar/baz?qux=quux")?;
assert_eq!(iri.fragment(), None);
source

pub fn fragment_str(&self) -> Option<&str>

Returns the fragment part as a raw string slice if exists.

A leading # character is truncated if the fragment part exists.

§Examples
let iri = IriStr::new("foo://bar/baz?qux=quux#corge")?;
assert_eq!(iri.fragment_str(), Some("corge"));
let iri = IriStr::new("foo://bar/baz?qux=quux#")?;
assert_eq!(iri.fragment_str(), Some(""));
let iri = IriStr::new("foo://bar/baz?qux=quux")?;
assert_eq!(iri.fragment_str(), None);
source

pub fn authority_components(&self) -> Option<AuthorityComponents<'_>>

Returns the authority components.

§Examples
use iri_string::types::IriStr;

let iri = IriStr::new("http://user:pass@example.com:8080/pathpath?queryquery")?;
let authority = iri.authority_components()
    .expect("authority is available");
assert_eq!(authority.userinfo(), Some("user:pass"));
assert_eq!(authority.host(), "example.com");
assert_eq!(authority.port(), Some("8080"));
use iri_string::types::IriStr;

let iri = IriStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.authority_str(), None);
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::{IriStr, UriString};

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

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

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

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

§Examples
use iri_string::types::{IriStr, UriStr};

let ascii_iri = IriStr::new("http://example.com/?alpha=%CE%B1")?;
assert_eq!(
    ascii_iri.as_uri().map(AsRef::as_ref),
    Some("http://example.com/?alpha=%CE%B1")
);

let nonascii_iri = IriStr::new("http://example.com/?alpha=\u{03B1}")?;
assert_eq!(nonascii_iri.as_uri(), None);

Trait Implementations§

source§

impl<S: Spec> AsRef<RiReferenceStr<S>> for RiString<S>

source§

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

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

impl<S: Spec> AsRef<RiStr<S>> for RiString<S>

source§

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

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

impl<S: Spec> AsRef<str> for RiString<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<RiStr<S>> for RiString<S>

source§

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

Immutably borrows from an owned value. Read more
source§

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

source§

fn borrow(&self) -> &str

Immutably borrows from an owned value. Read more
source§

impl<S: Spec> Clone for RiString<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 RiString<S>

source§

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

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

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

source§

type Target = RiStr<S>

The resulting type after dereferencing.
source§

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

Dereferences the value.
source§

impl<'de, S: Spec> Deserialize<'de> for RiString<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 RiString<S>

source§

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

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

impl<S: Spec> From<&Built<'_, RiStr<S>>> for RiString<S>

source§

fn from(builder: &Built<'_, RiStr<S>>) -> Self

Converts to this type from the input type.
source§

impl<S: Spec> From<&Normalized<'_, RiStr<S>>> for RiString<S>

source§

fn from(v: &Normalized<'_, RiStr<S>>) -> Self

Converts to this type from the input type.
source§

impl<S: Spec> From<&RiStr<S>> for RiString<S>

source§

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

Converts to this type from the input type.
source§

impl<'a, S: Spec> From<&'a RiString<S>> for MappedToUri<'a, RiStr<S>>

source§

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

Converts to this type from the input type.
source§

impl<S: Spec> From<Built<'_, RiStr<S>>> for RiString<S>

source§

fn from(builder: Built<'_, RiStr<S>>) -> Self

Converts to this type from the input type.
source§

impl<S: Spec> From<Normalized<'_, RiStr<S>>> for RiString<S>

source§

fn from(v: Normalized<'_, RiStr<S>>) -> Self

Converts to this type from the input type.
source§

impl<S: Spec> From<RiAbsoluteString<S>> for RiString<S>

source§

fn from(s: RiAbsoluteString<S>) -> RiString<S>

Converts to this type from the input type.
source§

impl<S: Spec> From<RiString<S>> for Box<RiStr<S>>

source§

fn from(s: RiString<S>) -> Box<RiStr<S>>

Converts to this type from the input type.
source§

impl<'a, S: Spec> From<RiString<S>> for Cow<'a, RiStr<S>>

source§

fn from(s: RiString<S>) -> Cow<'a, RiStr<S>>

Converts to this type from the input type.
source§

impl<S: Spec> From<RiString<S>> for RiReferenceString<S>

source§

fn from(s: RiString<S>) -> RiReferenceString<S>

Converts to this type from the input type.
source§

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

source§

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

Converts to this type from the input type.
source§

impl From<RiString<UriSpec>> for IriString

source§

fn from(uri: UriString) -> Self

Converts to this type from the input type.
source§

impl<S: Spec> FromStr for RiString<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 RiString<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 RiString<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<&RiAbsoluteStr<S>> for RiString<T>

source§

fn eq(&self, o: &&RiAbsoluteStr<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<&RiReferenceStr<T>> for RiString<S>

source§

fn eq(&self, o: &&RiReferenceStr<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<&RiStr<S>> for RiString<T>

source§

fn eq(&self, o: &&RiStr<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 RiString<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<'_, RiAbsoluteStr<S>>> for RiString<T>

source§

fn eq(&self, o: &Cow<'_, RiAbsoluteStr<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<Cow<'_, RiReferenceStr<T>>> for RiString<S>

source§

fn eq(&self, o: &Cow<'_, RiReferenceStr<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<Cow<'_, RiStr<S>>> for RiString<T>

source§

fn eq(&self, o: &Cow<'_, RiStr<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 RiString<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<RiAbsoluteStr<S>> for RiString<T>

source§

fn eq(&self, o: &RiAbsoluteStr<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<RiAbsoluteString<S>> for RiString<T>

source§

fn eq(&self, o: &RiAbsoluteString<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<RiReferenceStr<T>> for RiString<S>

source§

fn eq(&self, o: &RiReferenceStr<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<RiReferenceString<T>> for RiString<S>

source§

fn eq(&self, o: &RiReferenceString<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<RiStr<S>> for RiString<T>

source§

fn eq(&self, o: &RiStr<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<RiString<S>> for &RiReferenceStr<T>

source§

fn eq(&self, o: &RiString<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<RiString<S>> for &str

source§

fn eq(&self, o: &RiString<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<RiString<S>> for Cow<'_, RiReferenceStr<T>>

source§

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

source§

fn eq(&self, o: &RiString<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<RiString<S>> for RiReferenceStr<T>

source§

fn eq(&self, o: &RiString<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<RiString<S>> for RiReferenceString<T>

source§

fn eq(&self, o: &RiString<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<RiString<S>> for String

source§

fn eq(&self, o: &RiString<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<RiString<S>> for str

source§

fn eq(&self, o: &RiString<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<RiString<T>> for &RiAbsoluteStr<S>

source§

fn eq(&self, o: &RiString<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<RiString<T>> for &RiStr<S>

source§

fn eq(&self, o: &RiString<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<RiString<T>> for Cow<'_, RiAbsoluteStr<S>>

source§

fn eq(&self, o: &RiString<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<RiString<T>> for Cow<'_, RiStr<S>>

source§

fn eq(&self, o: &RiString<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<RiString<T>> for RiAbsoluteStr<S>

source§

fn eq(&self, o: &RiString<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<RiString<T>> for RiAbsoluteString<S>

source§

fn eq(&self, o: &RiString<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<RiString<T>> for RiStr<S>

source§

fn eq(&self, o: &RiString<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<RiString<T>> for RiString<S>

source§

fn eq(&self, other: &RiString<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 RiString<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 RiString<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<&RiAbsoluteStr<S>> for RiString<T>

source§

fn partial_cmp(&self, o: &&RiAbsoluteStr<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<&RiReferenceStr<T>> for RiString<S>

source§

fn partial_cmp(&self, o: &&RiReferenceStr<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<&RiStr<S>> for RiString<T>

source§

fn partial_cmp(&self, o: &&RiStr<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 RiString<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<'_, RiAbsoluteStr<S>>> for RiString<T>

source§

fn partial_cmp(&self, o: &Cow<'_, RiAbsoluteStr<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<Cow<'_, RiReferenceStr<T>>> for RiString<S>

source§

fn partial_cmp(&self, o: &Cow<'_, RiReferenceStr<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<Cow<'_, RiStr<S>>> for RiString<T>

source§

fn partial_cmp(&self, o: &Cow<'_, RiStr<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 RiString<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<RiAbsoluteStr<S>> for RiString<T>

source§

fn partial_cmp(&self, o: &RiAbsoluteStr<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<RiAbsoluteString<S>> for RiString<T>

source§

fn partial_cmp(&self, o: &RiAbsoluteString<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<RiReferenceStr<T>> for RiString<S>

source§

fn partial_cmp(&self, o: &RiReferenceStr<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<RiReferenceString<T>> for RiString<S>

source§

fn partial_cmp(&self, o: &RiReferenceString<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<RiStr<S>> for RiString<T>

source§

fn partial_cmp(&self, o: &RiStr<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<RiString<S>> for &RiReferenceStr<T>

source§

fn partial_cmp(&self, o: &RiString<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<RiString<S>> for &str

source§

fn partial_cmp(&self, o: &RiString<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<RiString<S>> for Cow<'_, RiReferenceStr<T>>

source§

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

source§

fn partial_cmp(&self, o: &RiString<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<RiString<S>> for RiReferenceStr<T>

source§

fn partial_cmp(&self, o: &RiString<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<RiString<S>> for RiReferenceString<T>

source§

fn partial_cmp(&self, o: &RiString<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<RiString<S>> for String

source§

fn partial_cmp(&self, o: &RiString<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<RiString<S>> for str

source§

fn partial_cmp(&self, o: &RiString<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<RiString<T>> for &RiAbsoluteStr<S>

source§

fn partial_cmp(&self, o: &RiString<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<RiString<T>> for &RiStr<S>

source§

fn partial_cmp(&self, o: &RiString<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<RiString<T>> for Cow<'_, RiAbsoluteStr<S>>

source§

fn partial_cmp(&self, o: &RiString<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<RiString<T>> for Cow<'_, RiStr<S>>

source§

fn partial_cmp(&self, o: &RiString<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<RiString<T>> for RiAbsoluteStr<S>

source§

fn partial_cmp(&self, o: &RiString<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<RiString<T>> for RiAbsoluteString<S>

source§

fn partial_cmp(&self, o: &RiString<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<RiString<T>> for RiStr<S>

source§

fn partial_cmp(&self, o: &RiString<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<RiString<T>> for RiString<S>

source§

fn partial_cmp(&self, other: &RiString<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 RiString<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 RiString<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 RiString<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 RiString<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 RiString<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, C: Context> TryFrom<Expanded<'_, S, C>> for RiString<S>

source§

type Error = CreationError<String>

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

fn try_from(v: Expanded<'_, S, C>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<S: Spec> TryFrom<RiReferenceString<S>> for RiString<S>

source§

type Error = CreationError<RiReferenceString<S>>

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

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

Performs the conversion.
source§

impl<S: Spec> TryFrom<RiString<S>> for RiAbsoluteString<S>

source§

type Error = CreationError<RiString<S>>

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

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

Performs the conversion.
source§

impl<S: Spec> TryFrom<String> for RiString<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 RiString<S>

Auto Trait Implementations§

§

impl<S> Freeze for RiString<S>

§

impl<S> RefUnwindSafe for RiString<S>

§

impl<S> Send for RiString<S>

§

impl<S> Sync for RiString<S>

§

impl<S> Unpin for RiString<S>

§

impl<S> UnwindSafe for RiString<S>

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>,