Struct RiStr

struct RiStr<S> { ... }

A borrowed 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 RiAbsoluteStr with fragment part allowed.

Valid values

This type can have an IRI (which is absolute, and may have fragment part).

# use iri_string::types::IriStr;
assert!(IriStr::new("https://user:pass@example.com:8080").is_ok());
assert!(IriStr::new("https://example.com/").is_ok());
assert!(IriStr::new("https://example.com/foo?bar=baz").is_ok());
assert!(IriStr::new("https://example.com/foo?bar=baz#qux").is_ok());
assert!(IriStr::new("foo:bar").is_ok());
assert!(IriStr::new("foo:").is_ok());
// `foo://.../` below are all allowed. See the crate documentation for detail.
assert!(IriStr::new("foo:/").is_ok());
assert!(IriStr::new("foo://").is_ok());
assert!(IriStr::new("foo:///").is_ok());
assert!(IriStr::new("foo:////").is_ok());
assert!(IriStr::new("foo://///").is_ok());

Relative IRI reference is not allowed.

# use iri_string::types::IriStr;
// This is relative path.
assert!(IriStr::new("foo/bar").is_err());
// `/foo/bar` is an absolute path, but it is authority-relative.
assert!(IriStr::new("/foo/bar").is_err());
// `//foo/bar` is termed "network-path reference",
// or usually called "protocol-relative reference".
assert!(IriStr::new("//foo/bar").is_err());
// Same-document reference is relative.
assert!(IriStr::new("#foo").is_err());
// Empty string is not a valid absolute IRI.
assert!(IriStr::new("").is_err());

Some characters and sequences cannot used in an IRI.

# use iri_string::types::IriStr;
// `<` and `>` cannot directly appear in an IRI.
assert!(IriStr::new("<not allowed>").is_err());
// Broken percent encoding cannot appear in an IRI.
assert!(IriStr::new("%").is_err());
assert!(IriStr::new("%GG").is_err());

Implementations

impl RiStr<IriSpec>

fn encode_to_uri(self: &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]crate::convert::MappedToUri type.

Examples

# use iri_string::validate::Error;
# #[cfg(feature = "alloc")] {
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");
# }
# Ok::<_, Error>(())
fn as_uri(self: &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::validate::Error;
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);
# Ok::<_, Error>(())

impl<S: Spec> RiStr<S>

fn scheme_str(self: &Self) -> &str

Returns the scheme.

The following colon is truncated.

Examples

# use iri_string::validate::Error;
use iri_string::types::IriStr;

let iri = IriStr::new("http://example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.scheme_str(), "http");
# Ok::<_, Error>(())
fn authority_str(self: &Self) -> Option<&str>

Returns the authority.

The leading // is truncated.

Examples

# use iri_string::validate::Error;
use iri_string::types::IriStr;

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

let iri = IriStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.authority_str(), None);
# Ok::<_, Error>(())
fn path_str(self: &Self) -> &str

Returns the path.

Examples

# use iri_string::validate::Error;
use iri_string::types::IriStr;

let iri = IriStr::new("http://example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.path_str(), "/pathpath");
# Ok::<_, Error>(())
# use iri_string::validate::Error;
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");
# Ok::<_, Error>(())
fn query(self: &Self) -> Option<&RiQueryStr<S>>

Returns the query.

The leading question mark (?) is truncated.

Examples

# use iri_string::validate::Error;
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));
# Ok::<_, Error>(())
# use iri_string::validate::Error;
use iri_string::types::IriStr;

let iri = IriStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.query(), None);
# Ok::<_, Error>(())
fn query_str(self: &Self) -> Option<&str>

Returns the query in a raw string slice.

The leading question mark (?) is truncated.

Examples

# use iri_string::validate::Error;
use iri_string::types::IriStr;

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

let iri = IriStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.query_str(), None);
# Ok::<_, Error>(())
fn fragment(self: &Self) -> Option<&RiFragmentStr<S>>

Returns the fragment part if exists.

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

Examples

# use iri_string::{spec::IriSpec, types::{IriFragmentStr, IriStr}, validate::Error};
let iri = IriStr::new("foo://bar/baz?qux=quux#corge")?;
let fragment = IriFragmentStr::new("corge")?;
assert_eq!(iri.fragment(), Some(fragment));
# Ok::<_, Error>(())
# use iri_string::{spec::IriSpec, types::{IriFragmentStr, IriStr}, validate::Error};
let iri = IriStr::new("foo://bar/baz?qux=quux#")?;
let fragment = IriFragmentStr::new("")?;
assert_eq!(iri.fragment(), Some(fragment));
# Ok::<_, Error>(())
# use iri_string::{spec::IriSpec, types::IriStr, validate::Error};
let iri = IriStr::new("foo://bar/baz?qux=quux")?;
assert_eq!(iri.fragment(), None);
# Ok::<_, Error>(())
fn fragment_str(self: &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

# use iri_string::{spec::IriSpec, types::IriStr, validate::Error};
let iri = IriStr::new("foo://bar/baz?qux=quux#corge")?;
assert_eq!(iri.fragment_str(), Some("corge"));
# Ok::<_, Error>(())
# use iri_string::{spec::IriSpec, types::IriStr, validate::Error};
let iri = IriStr::new("foo://bar/baz?qux=quux#")?;
assert_eq!(iri.fragment_str(), Some(""));
# Ok::<_, Error>(())
# use iri_string::{spec::IriSpec, types::IriStr, validate::Error};
let iri = IriStr::new("foo://bar/baz?qux=quux")?;
assert_eq!(iri.fragment_str(), None);
# Ok::<_, Error>(())
fn authority_components(self: &Self) -> Option<AuthorityComponents<'_>>

Returns the authority components.

Examples

# use iri_string::validate::Error;
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"));
# Ok::<_, Error>(())
# use iri_string::validate::Error;
use iri_string::types::IriStr;

let iri = IriStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.authority_str(), None);
# Ok::<_, Error>(())

impl<S: Spec> RiStr<S>

fn to_absolute_and_fragment(self: &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.

# use iri_string::{spec::IriSpec, types::{IriFragmentStr, IriStr}, validate::Error};
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));
# Ok::<_, Error>(())

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

# use iri_string::{spec::IriSpec, types::{IriFragmentStr, IriStr}, validate::Error};
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));
# Ok::<_, Error>(())

If the IRI has no fragment, None is returned.

# use iri_string::{spec::IriSpec, types::IriStr, validate::Error};
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);
# Ok::<_, Error>(())
fn to_absolute(self: &Self) -> &RiAbsoluteStr<S>

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

Examples

# use iri_string::{spec::IriSpec, types::IriStr, validate::Error};
let iri = IriStr::new("foo://bar/baz?qux=quux#corge")?;
assert_eq!(iri.to_absolute(), "foo://bar/baz?qux=quux");
# Ok::<_, Error>(())
# use iri_string::{spec::IriSpec, types::IriStr, validate::Error};
let iri = IriStr::new("foo://bar/baz?qux=quux")?;
assert_eq!(iri.to_absolute(), "foo://bar/baz?qux=quux");
# Ok::<_, Error>(())
fn ensure_rfc3986_normalizable(self: &Self) -> Result<(), Error>

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

Examples

# use iri_string::validate::Error;
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());
# Ok::<_, Error>(())
fn is_normalized(self: &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::validate::Error;
# #[cfg(feature = "alloc")] {
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());
# }
# Ok::<_, Error>(())
# use iri_string::validate::Error;
# #[cfg(feature = "alloc")] {
use iri_string::format::ToDedicatedString;
use iri_string::types::IriStr;

let iri = IriStr::new("scheme:/.///foo")?;
// Already normalized.
assert!(iri.is_normalized());
# }
# Ok::<_, Error>(())
# use iri_string::validate::Error;
# #[cfg(feature = "alloc")] {
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");
# }
# Ok::<_, Error>(())
fn is_normalized_rfc3986(self: &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::validate::Error;
# #[cfg(feature = "alloc")] {
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());
# }
# Ok::<_, Error>(())
# use iri_string::validate::Error;
# #[cfg(feature = "alloc")] {
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());
# }
# Ok::<_, Error>(())
# use iri_string::validate::Error;
# #[cfg(feature = "alloc")] {
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");
# }
# Ok::<_, Error>(())
fn is_normalized_but_authorityless_relative_path_preserved(self: &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::validate::Error;
# #[cfg(feature = "alloc")] {
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());
# }
# Ok::<_, Error>(())
# use iri_string::validate::Error;
# #[cfg(feature = "alloc")] {
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());
# }
# Ok::<_, Error>(())
# use iri_string::validate::Error;
# #[cfg(feature = "alloc")] {
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());
# }
# Ok::<_, Error>(())
fn normalize(self: &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::validate::Error;
# #[cfg(feature = "alloc")] {
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");
# }
# Ok::<_, Error>(())
fn normalize_but_preserve_authorityless_relative_path(self: &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::validate::Error;
# #[cfg(feature = "alloc")] {
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");
# }
# Ok::<_, Error>(())
# use iri_string::validate::Error;
# #[cfg(feature = "alloc")] {
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`.
# assert_eq!(iri.normalize().to_dedicated_string(), "scheme:/foo");
# }
# Ok::<_, Error>(())
fn mask_password(self: &Self) -> PasswordMasked<'_, Self>

Returns the proxy to the IRI with password masking feature.

Examples

# use iri_string::validate::Error;
# #[cfg(feature = "alloc")] {
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"
);
# }
# Ok::<_, Error>(())

impl<S: crate::spec::Spec> RiStr<S>

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

Creates a new string.

unsafe fn new_unchecked(s: &str) -> &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.

fn as_str(self: &Self) -> &str

Returns &str.

fn len(self: &Self) -> usize

Returns the string length.

fn is_empty(self: &Self) -> bool

Returns whether the string is empty.

impl<S> Freeze for RiStr<S>

impl<S> RefUnwindSafe for RiStr<S>

impl<S> Send for RiStr<S>

impl<S> Sized for RiStr<S>

impl<S> Sync for RiStr<S>

impl<S> Unpin for RiStr<S>

impl<S> UnsafeUnpin for RiStr<S>

impl<S> UnwindSafe for RiStr<S>

impl<S: Spec> Buildable for RiStr<S>

impl<S: crate::spec::Spec> AsRef for RiStr<S>

fn as_ref(self: &Self) -> &str

impl<S: crate::spec::Spec> AsRef for RiStr<S>

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

impl<S: crate::spec::Spec> AsRef for RiStr<S>

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

impl<S: crate::spec::Spec> Debug for RiStr<S>

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

impl<S: crate::spec::Spec> Display for RiStr<S>

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

impl<S: crate::spec::Spec> Eq for RiStr<S>

impl<S: crate::spec::Spec> Hash for RiStr<S>

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

impl<S: crate::spec::Spec> Ord for RiStr<S>

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

impl<S: crate::spec::Spec> PartialEq for RiStr<S>

fn eq(self: &Self, o: &Cow<'_, str>) -> bool

impl<S: crate::spec::Spec> PartialEq for RiStr<S>

fn eq(self: &Self, o: &&str) -> bool

impl<S: crate::spec::Spec> PartialEq for RiStr<S>

fn eq(self: &Self, o: &str) -> bool

impl<S: crate::spec::Spec> PartialEq for RiStr<S>

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

impl<S: crate::spec::Spec> PartialOrd for RiStr<S>

fn partial_cmp(self: &Self, o: &Cow<'_, str>) -> Option<Ordering>

impl<S: crate::spec::Spec> PartialOrd for RiStr<S>

fn partial_cmp(self: &Self, o: &&str) -> Option<Ordering>

impl<S: crate::spec::Spec> PartialOrd for RiStr<S>

fn partial_cmp(self: &Self, o: &str) -> Option<Ordering>

impl<S: crate::spec::Spec> PartialOrd for RiStr<S>

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

impl<S: crate::spec::Spec> ToOwned for RiStr<S>

fn to_owned(self: &Self) -> <Self as >::Owned

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiStr<S>

fn eq(self: &Self, o: &RiReferenceString<T>) -> bool

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiStr<S>

fn eq(self: &Self, o: &Cow<'_, RiReferenceStr<T>>) -> bool

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiStr<S>

fn eq(self: &Self, o: &&RiReferenceStr<T>) -> bool

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiStr<S>

fn eq(self: &Self, o: &RiReferenceStr<T>) -> bool

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiStr<S>

fn eq(self: &Self, o: &RiString<T>) -> bool

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiStr<T>

fn eq(self: &Self, o: &&RiStr<S>) -> bool

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiStr<T>

fn eq(self: &Self, o: &RiAbsoluteString<S>) -> bool

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiStr<T>

fn eq(self: &Self, o: &Cow<'_, RiAbsoluteStr<S>>) -> bool

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiStr<T>

fn eq(self: &Self, o: &&RiAbsoluteStr<S>) -> bool

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiStr<T>

fn eq(self: &Self, o: &RiAbsoluteStr<S>) -> bool

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiStr<S>

fn partial_cmp(self: &Self, o: &RiString<T>) -> Option<Ordering>

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiStr<S>

fn partial_cmp(self: &Self, o: &RiReferenceString<T>) -> Option<Ordering>

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiStr<S>

fn partial_cmp(self: &Self, o: &Cow<'_, RiReferenceStr<T>>) -> Option<Ordering>

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiStr<S>

fn partial_cmp(self: &Self, o: &&RiReferenceStr<T>) -> Option<Ordering>

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiStr<S>

fn partial_cmp(self: &Self, o: &RiReferenceStr<T>) -> Option<Ordering>

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiStr<T>

fn partial_cmp(self: &Self, o: &RiAbsoluteString<S>) -> Option<Ordering>

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiStr<T>

fn partial_cmp(self: &Self, o: &Cow<'_, RiAbsoluteStr<S>>) -> Option<Ordering>

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiStr<T>

fn partial_cmp(self: &Self, o: &&RiAbsoluteStr<S>) -> Option<Ordering>

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiStr<T>

fn partial_cmp(self: &Self, o: &RiAbsoluteStr<S>) -> Option<Ordering>

impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiStr<T>

fn partial_cmp(self: &Self, o: &&RiStr<S>) -> Option<Ordering>

impl<T> Any for RiStr<S>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for RiStr<S>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for RiStr<S>

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

impl<T> ToString for RiStr<S>

fn to_string(self: &Self) -> String