pub struct RiReferenceString<S> { /* private fields */ }
alloc
only.Expand description
An owned string of an absolute IRI possibly with fragment part.
This corresponds to IRI-reference
rule in RFC 3987
(and URI-reference
rule in RFC 3986).
The rule for IRI-reference
is IRI / irelative-ref
.
In other words, this is union of RiString
and RiRelativeString
.
For details, see the document for RiReferenceStr
.
Enabled by alloc
or std
feature.
Implementations§
source§impl<S: Spec> RiReferenceString<S>
impl<S: Spec> RiReferenceString<S>
sourcepub unsafe fn new_unchecked(s: String) -> Self
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.
sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the inner buffer to match its length.
sourcepub fn as_slice(&self) -> &RiReferenceStr<S>
pub fn as_slice(&self) -> &RiReferenceStr<S>
Returns the borrowed IRI string slice.
This is equivalent to &*self
.
source§impl<S: Spec> RiReferenceString<S>
impl<S: Spec> RiReferenceString<S>
sourcepub fn into_iri(self) -> Result<RiString<S>, RiRelativeString<S>>
pub fn into_iri(self) -> Result<RiString<S>, RiRelativeString<S>>
Returns the string as RiString
, if it is valid as an IRI.
If it is not an IRI, then RiRelativeString
is returned as Err(_)
.
sourcepub fn into_relative_iri(self) -> Result<RiRelativeString<S>, RiString<S>>
pub fn into_relative_iri(self) -> Result<RiRelativeString<S>, RiString<S>>
Returns the string as RiRelativeString
, if it is valid as an IRI.
If it is not an IRI, then RiString
is returned as Err(_)
.
sourcepub fn set_fragment(&mut self, fragment: Option<&RiFragmentStr<S>>)
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.
sourcepub fn remove_password_inline(&mut self)
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::IriReferenceString;
let mut iri = IriReferenceString::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::IriReferenceString;
let mut iri = IriReferenceString::try_from("http://user:@example.com/path?query")?;
iri.remove_password_inline();
assert_eq!(iri, "http://user@example.com/path?query");
sourcepub fn remove_nonempty_password_inline(&mut self)
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::IriReferenceString;
let mut iri = IriReferenceString::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::IriReferenceString;
let mut iri = IriReferenceString::try_from("http://user:@example.com/path?query")?;
iri.remove_nonempty_password_inline();
assert_eq!(iri, "http://user:@example.com/path?query");
source§impl RiReferenceString<IriSpec>
impl RiReferenceString<IriSpec>
Conversion from an IRI into a URI.
sourcepub fn encode_to_uri_inline(&mut self)
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::IriReferenceString;
let mut iri = IriReferenceString::try_from("http://example.com/?alpha=\u{03B1}")?;
iri.encode_to_uri_inline();
assert_eq!(iri, "http://example.com/?alpha=%CE%B1");
sourcepub fn try_encode_to_uri_inline(&mut self) -> Result<(), TryReserveError>
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::IriReferenceString;
let mut iri = IriReferenceString::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");
sourcepub fn encode_into_uri(self) -> UriReferenceString
pub fn encode_into_uri(self) -> UriReferenceString
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::{IriReferenceString, UriReferenceString};
let iri = IriReferenceString::try_from("http://example.com/?alpha=\u{03B1}")?;
// Type annotation here is not necessary.
let uri: UriReferenceString = iri.encode_into_uri();
assert_eq!(uri, "http://example.com/?alpha=%CE%B1");
sourcepub fn try_encode_into_uri(self) -> Result<UriReferenceString, TryReserveError>
pub fn try_encode_into_uri(self) -> Result<UriReferenceString, 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::{IriReferenceString, UriReferenceString};
let iri = IriReferenceString::try_from("http://example.com/?alpha=\u{03B1}")?;
// Type annotation here is not necessary.
let uri: UriReferenceString = iri.try_encode_into_uri()
.expect("failed to allocate memory");
assert_eq!(uri, "http://example.com/?alpha=%CE%B1");
sourcepub fn try_into_uri(self) -> Result<UriReferenceString, IriReferenceString>
pub fn try_into_uri(self) -> Result<UriReferenceString, IriReferenceString>
Converts an IRI into a URI without modification, if possible.
§Examples
use iri_string::types::{IriReferenceString, UriReferenceString};
let ascii_iri = IriReferenceString::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 = IriReferenceString::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 = RiReferenceStr<S>>§
sourcepub fn to_iri(&self) -> Result<&RiStr<S>, &RiRelativeStr<S>>
pub fn to_iri(&self) -> Result<&RiStr<S>, &RiRelativeStr<S>>
Returns the string as &RiStr
, if it is valid as an IRI.
If it is not an IRI, then &RiRelativeStr
is returned as Err(_)
.
sourcepub fn to_relative_iri(&self) -> Result<&RiRelativeStr<S>, &RiStr<S>>
pub fn to_relative_iri(&self) -> Result<&RiRelativeStr<S>, &RiStr<S>>
Returns the string as &RiRelativeStr
, if it is valid as an IRI.
If it is not an IRI, then &RiStr
is returned as Err(_)
.
sourcepub fn resolve_against<'a>(
&'a self,
base: &'a RiAbsoluteStr<S>,
) -> Normalized<'a, RiStr<S>>
pub fn resolve_against<'a>( &'a self, base: &'a RiAbsoluteStr<S>, ) -> Normalized<'a, RiStr<S>>
Returns resolved IRI against the given base IRI.
For IRI reference resolution output examples, see RFC 3986 section 5.4.
If you are going to resolve multiple references against the common base,
consider using FixedBaseResolver
.
§Strictness
The IRI parsers provided by this crate is strict (e.g. http:g
is
always interpreted as a composition of the scheme http
and the path
g
), so backward compatible parsing and resolution are not provided.
About parser and resolver strictness, see RFC 3986 section 5.4.2:
Some parsers allow the scheme name to be present in a relative reference if it is the same as the base URI scheme. This is considered to be a loophole in prior specifications of partial URI RFC1630. Its use should be avoided but is allowed for backward compatibility.
§Failures
This method itself does not fail, but IRI resolution without WHATWG URL Standard serialization can fail in some minor cases.
To see examples of such unresolvable IRIs, visit the documentation
for normalize
module.
sourcepub fn mask_password(&self) -> PasswordMasked<'_, Self>
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::IriReferenceStr;
let iri = IriReferenceStr::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"
);
sourcepub fn scheme_str(&self) -> Option<&str>
pub fn scheme_str(&self) -> Option<&str>
Returns the scheme.
The following colon is truncated.
§Examples
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::new("http://example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.scheme_str(), Some("http"));
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::new("foo/bar:baz")?;
assert_eq!(iri.scheme_str(), None);
Returns the authority.
The leading //
is truncated.
§Examples
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::new("http://example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.authority_str(), Some("example.com"));
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.authority_str(), None);
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::new("foo/bar:baz")?;
assert_eq!(iri.authority_str(), None);
sourcepub fn path_str(&self) -> &str
pub fn path_str(&self) -> &str
Returns the path.
§Examples
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::new("http://example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.path_str(), "/pathpath");
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.path_str(), "uuid:10db315b-fcd1-4428-aca8-15babc9a2da2");
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::new("foo/bar:baz")?;
assert_eq!(iri.path_str(), "foo/bar:baz");
sourcepub fn query(&self) -> Option<&RiQueryStr<S>>
pub fn query(&self) -> Option<&RiQueryStr<S>>
Returns the query.
The leading question mark (?
) is truncated.
§Examples
use iri_string::types::{IriQueryStr, IriReferenceStr};
let iri = IriReferenceStr::new("http://example.com/pathpath?queryquery#fragfrag")?;
let query = IriQueryStr::new("queryquery")?;
assert_eq!(iri.query(), Some(query));
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.query(), None);
use iri_string::types::{IriQueryStr, IriReferenceStr};
let iri = IriReferenceStr::new("foo/bar:baz?")?;
let query = IriQueryStr::new("")?;
assert_eq!(iri.query(), Some(query));
sourcepub fn query_str(&self) -> Option<&str>
pub fn query_str(&self) -> Option<&str>
Returns the query as a raw string slice.
The leading question mark (?
) is truncated.
§Examples
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::new("http://example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.query_str(), Some("queryquery"));
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.query_str(), None);
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::new("foo/bar:baz?")?;
assert_eq!(iri.query_str(), Some(""));
sourcepub fn fragment(&self) -> Option<&RiFragmentStr<S>>
pub fn fragment(&self) -> Option<&RiFragmentStr<S>>
Returns the fragment part if exists.
A leading #
character is truncated if the fragment part exists.
§Examples
If the IRI has a fragment part, Some(_)
is returned.
let iri = IriReferenceStr::new("foo://bar/baz?qux=quux#corge")?;
let fragment = IriFragmentStr::new("corge")?;
assert_eq!(iri.fragment(), Some(fragment));
let iri = IriReferenceStr::new("#foo")?;
let fragment = IriFragmentStr::new("foo")?;
assert_eq!(iri.fragment(), Some(fragment));
When the fragment part exists but is empty string, Some(_)
is returned.
let iri = IriReferenceStr::new("foo://bar/baz?qux=quux#")?;
let fragment = IriFragmentStr::new("")?;
assert_eq!(iri.fragment(), Some(fragment));
let iri = IriReferenceStr::new("#")?;
let fragment = IriFragmentStr::new("")?;
assert_eq!(iri.fragment(), Some(fragment));
If the IRI has no fragment, None
is returned.
let iri = IriReferenceStr::new("foo://bar/baz?qux=quux")?;
assert_eq!(iri.fragment(), None);
let iri = IriReferenceStr::new("")?;
assert_eq!(iri.fragment(), None);
sourcepub fn fragment_str(&self) -> Option<&str>
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
If the IRI has a fragment part, Some(_)
is returned.
let iri = IriReferenceStr::new("foo://bar/baz?qux=quux#corge")?;
assert_eq!(iri.fragment_str(), Some("corge"));
let iri = IriReferenceStr::new("#foo")?;
assert_eq!(iri.fragment_str(), Some("foo"));
When the fragment part exists but is empty string, Some(_)
is returned.
let iri = IriReferenceStr::new("foo://bar/baz?qux=quux#")?;
assert_eq!(iri.fragment_str(), Some(""));
let iri = IriReferenceStr::new("#")?;
assert_eq!(iri.fragment_str(), Some(""));
If the IRI has no fragment, None
is returned.
let iri = IriReferenceStr::new("foo://bar/baz?qux=quux")?;
assert_eq!(iri.fragment(), None);
let iri = IriReferenceStr::new("")?;
assert_eq!(iri.fragment(), None);
Returns the authority components.
§Examples
use iri_string::types::IriReferenceStr;
let iri = IriReferenceStr::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::IriReferenceStr;
let iri = IriReferenceStr::new("foo//bar:baz")?;
assert_eq!(iri.authority_str(), None);
sourcepub fn encode_to_uri(&self) -> MappedToUri<'_, Self>
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::{IriReferenceStr, UriReferenceString};
let iri = IriReferenceStr::new("http://example.com/?alpha=\u{03B1}")?;
// Type annotation here is not necessary.
let uri: UriReferenceString = iri.encode_to_uri().to_dedicated_string();
assert_eq!(uri, "http://example.com/?alpha=%CE%B1");
sourcepub fn as_uri(&self) -> Option<&UriReferenceStr>
pub fn as_uri(&self) -> Option<&UriReferenceStr>
Converts an IRI into a URI without modification, if possible.
This is semantically equivalent to
UriReferenceStr::new(self.as_str()).ok()
.
§Examples
use iri_string::types::{IriReferenceStr, UriReferenceStr};
let ascii_iri = IriReferenceStr::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 = IriReferenceStr::new("http://example.com/?alpha=\u{03B1}")?;
assert_eq!(nonascii_iri.as_uri(), None);
Trait Implementations§
source§impl<S: Spec> AsRef<RiReferenceStr<S>> for RiReferenceString<S>
impl<S: Spec> AsRef<RiReferenceStr<S>> for RiReferenceString<S>
source§fn as_ref(&self) -> &RiReferenceStr<S>
fn as_ref(&self) -> &RiReferenceStr<S>
source§impl<S: Spec> Borrow<RiReferenceStr<S>> for RiReferenceString<S>
impl<S: Spec> Borrow<RiReferenceStr<S>> for RiReferenceString<S>
source§fn borrow(&self) -> &RiReferenceStr<S>
fn borrow(&self) -> &RiReferenceStr<S>
source§impl<S: Spec> Clone for RiReferenceString<S>
impl<S: Spec> Clone for RiReferenceString<S>
source§impl<S: Spec> Debug for RiReferenceString<S>
impl<S: Spec> Debug for RiReferenceString<S>
source§impl<S: Spec> Deref for RiReferenceString<S>
impl<S: Spec> Deref for RiReferenceString<S>
source§type Target = RiReferenceStr<S>
type Target = RiReferenceStr<S>
source§fn deref(&self) -> &RiReferenceStr<S>
fn deref(&self) -> &RiReferenceStr<S>
source§impl<'de, S: Spec> Deserialize<'de> for RiReferenceString<S>
Available on crate feature serde
only.
impl<'de, S: Spec> Deserialize<'de> for RiReferenceString<S>
serde
only.source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl<S: Spec> Display for RiReferenceString<S>
impl<S: Spec> Display for RiReferenceString<S>
source§impl<S: Spec> From<&Built<'_, RiReferenceStr<S>>> for RiReferenceString<S>
impl<S: Spec> From<&Built<'_, RiReferenceStr<S>>> for RiReferenceString<S>
source§fn from(builder: &Built<'_, RiReferenceStr<S>>) -> Self
fn from(builder: &Built<'_, RiReferenceStr<S>>) -> Self
source§impl<S: Spec> From<&RiReferenceStr<S>> for RiReferenceString<S>
impl<S: Spec> From<&RiReferenceStr<S>> for RiReferenceString<S>
source§fn from(s: &RiReferenceStr<S>) -> Self
fn from(s: &RiReferenceStr<S>) -> Self
source§impl<'a, S: Spec> From<&'a RiReferenceString<S>> for MappedToUri<'a, RiReferenceStr<S>>
impl<'a, S: Spec> From<&'a RiReferenceString<S>> for MappedToUri<'a, RiReferenceStr<S>>
source§fn from(iri: &'a RiReferenceString<S>) -> Self
fn from(iri: &'a RiReferenceString<S>) -> Self
source§impl<S: Spec> From<Built<'_, RiReferenceStr<S>>> for RiReferenceString<S>
impl<S: Spec> From<Built<'_, RiReferenceStr<S>>> for RiReferenceString<S>
source§fn from(builder: Built<'_, RiReferenceStr<S>>) -> Self
fn from(builder: Built<'_, RiReferenceStr<S>>) -> Self
source§impl<S: Spec> From<RiAbsoluteString<S>> for RiReferenceString<S>
impl<S: Spec> From<RiAbsoluteString<S>> for RiReferenceString<S>
source§fn from(s: RiAbsoluteString<S>) -> RiReferenceString<S>
fn from(s: RiAbsoluteString<S>) -> RiReferenceString<S>
source§impl<S: Spec> From<RiReferenceString<S>> for Box<RiReferenceStr<S>>
impl<S: Spec> From<RiReferenceString<S>> for Box<RiReferenceStr<S>>
source§fn from(s: RiReferenceString<S>) -> Box<RiReferenceStr<S>>
fn from(s: RiReferenceString<S>) -> Box<RiReferenceStr<S>>
source§impl<'a, S: Spec> From<RiReferenceString<S>> for Cow<'a, RiReferenceStr<S>>
impl<'a, S: Spec> From<RiReferenceString<S>> for Cow<'a, RiReferenceStr<S>>
source§fn from(s: RiReferenceString<S>) -> Cow<'a, RiReferenceStr<S>>
fn from(s: RiReferenceString<S>) -> Cow<'a, RiReferenceStr<S>>
source§impl<S: Spec> From<RiReferenceString<S>> for String
impl<S: Spec> From<RiReferenceString<S>> for String
source§fn from(s: RiReferenceString<S>) -> Self
fn from(s: RiReferenceString<S>) -> Self
source§impl From<RiReferenceString<UriSpec>> for IriReferenceString
impl From<RiReferenceString<UriSpec>> for IriReferenceString
source§fn from(uri: UriReferenceString) -> Self
fn from(uri: UriReferenceString) -> Self
source§impl<S: Spec> From<RiRelativeString<S>> for RiReferenceString<S>
impl<S: Spec> From<RiRelativeString<S>> for RiReferenceString<S>
source§fn from(s: RiRelativeString<S>) -> RiReferenceString<S>
fn from(s: RiRelativeString<S>) -> RiReferenceString<S>
source§impl<S: Spec> From<RiString<S>> for RiReferenceString<S>
impl<S: Spec> From<RiString<S>> for RiReferenceString<S>
source§fn from(s: RiString<S>) -> RiReferenceString<S>
fn from(s: RiString<S>) -> RiReferenceString<S>
source§impl<S: Spec> FromStr for RiReferenceString<S>
impl<S: Spec> FromStr for RiReferenceString<S>
source§impl<S: Spec> Hash for RiReferenceString<S>
impl<S: Spec> Hash for RiReferenceString<S>
source§impl<S: Spec> Ord for RiReferenceString<S>
impl<S: Spec> Ord for RiReferenceString<S>
source§impl<S: Spec, T: Spec> PartialEq<&RiAbsoluteStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<&RiAbsoluteStr<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialEq<&RiReferenceStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<&RiReferenceStr<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiAbsoluteStr<S>>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiAbsoluteStr<S>>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiReferenceStr<S>>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiReferenceStr<S>>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiRelativeStr<S>>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiRelativeStr<S>>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialEq<RiAbsoluteStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<RiAbsoluteStr<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<RiReferenceStr<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for &RiAbsoluteStr<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for &RiAbsoluteStr<S>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for &RiReferenceStr<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for &RiReferenceStr<S>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for &RiRelativeStr<S>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for Cow<'_, RiAbsoluteStr<S>>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for Cow<'_, RiAbsoluteStr<S>>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for Cow<'_, RiReferenceStr<S>>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for Cow<'_, RiReferenceStr<S>>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for Cow<'_, RiRelativeStr<S>>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for Cow<'_, RiRelativeStr<S>>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiAbsoluteStr<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiAbsoluteStr<S>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiAbsoluteString<S>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiReferenceStr<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiReferenceStr<S>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiReferenceString<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiReferenceString<S>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiRelativeStr<S>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiRelativeString<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiRelativeString<S>
source§impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialEq<RiRelativeString<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<RiRelativeString<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialOrd<&RiAbsoluteStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<&RiAbsoluteStr<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialOrd<&RiReferenceStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<&RiReferenceStr<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialOrd<&RiStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<&RiStr<S>> for RiReferenceString<T>
source§impl<S: Spec> PartialOrd<&str> for RiReferenceString<S>
impl<S: Spec> PartialOrd<&str> for RiReferenceString<S>
source§impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiAbsoluteStr<S>>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiAbsoluteStr<S>>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiReferenceStr<S>>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiReferenceStr<S>>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiRelativeStr<S>>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiRelativeStr<S>>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiStr<S>>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiStr<S>>> for RiReferenceString<T>
source§impl<S: Spec> PartialOrd<Cow<'_, str>> for RiReferenceString<S>
impl<S: Spec> PartialOrd<Cow<'_, str>> for RiReferenceString<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteStr<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceStr<S>> for RiReferenceString<T>
source§impl<S: Spec> PartialOrd<RiReferenceString<S>> for &str
impl<S: Spec> PartialOrd<RiReferenceString<S>> for &str
source§impl<S: Spec> PartialOrd<RiReferenceString<S>> for Cow<'_, str>
impl<S: Spec> PartialOrd<RiReferenceString<S>> for Cow<'_, str>
source§impl<S: Spec> PartialOrd<RiReferenceString<S>> for String
impl<S: Spec> PartialOrd<RiReferenceString<S>> for String
source§impl<S: Spec> PartialOrd<RiReferenceString<S>> for str
impl<S: Spec> PartialOrd<RiReferenceString<S>> for str
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for &RiAbsoluteStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for &RiAbsoluteStr<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for &RiReferenceStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for &RiReferenceStr<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for &RiRelativeStr<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for &RiStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for &RiStr<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for Cow<'_, RiAbsoluteStr<S>>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for Cow<'_, RiAbsoluteStr<S>>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for Cow<'_, RiReferenceStr<S>>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for Cow<'_, RiReferenceStr<S>>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for Cow<'_, RiRelativeStr<S>>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for Cow<'_, RiRelativeStr<S>>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for Cow<'_, RiStr<S>>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for Cow<'_, RiStr<S>>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiAbsoluteStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiAbsoluteStr<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiAbsoluteString<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiReferenceStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiReferenceStr<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiReferenceString<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiReferenceString<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiRelativeStr<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiRelativeString<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiRelativeString<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiStr<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiString<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiString<S>
source§impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialOrd<RiRelativeString<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<RiRelativeString<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialOrd<RiStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<RiStr<S>> for RiReferenceString<T>
source§impl<S: Spec, T: Spec> PartialOrd<RiString<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<RiString<S>> for RiReferenceString<T>
source§impl<S: Spec> PartialOrd<String> for RiReferenceString<S>
impl<S: Spec> PartialOrd<String> for RiReferenceString<S>
source§impl<S: Spec> PartialOrd<str> for RiReferenceString<S>
impl<S: Spec> PartialOrd<str> for RiReferenceString<S>
source§impl<S> Serialize for RiReferenceString<S>where
S: Spec,
impl<S> Serialize for RiReferenceString<S>where
S: Spec,
source§impl<S: Spec> TryFrom<RiReferenceString<S>> for RiAbsoluteString<S>
impl<S: Spec> TryFrom<RiReferenceString<S>> for RiAbsoluteString<S>
source§type Error = CreationError<RiReferenceString<S>>
type Error = CreationError<RiReferenceString<S>>
source§impl<S: Spec> TryFrom<RiReferenceString<S>> for RiRelativeString<S>
impl<S: Spec> TryFrom<RiReferenceString<S>> for RiRelativeString<S>
source§type Error = CreationError<RiReferenceString<S>>
type Error = CreationError<RiReferenceString<S>>
source§impl<S: Spec> TryFrom<RiReferenceString<S>> for RiString<S>
impl<S: Spec> TryFrom<RiReferenceString<S>> for RiString<S>
source§type Error = CreationError<RiReferenceString<S>>
type Error = CreationError<RiReferenceString<S>>
impl<S: Spec> Eq for RiReferenceString<S>
Auto Trait Implementations§
impl<S> Freeze for RiReferenceString<S>
impl<S> RefUnwindSafe for RiReferenceString<S>
impl<S> Send for RiReferenceString<S>
impl<S> Sync for RiReferenceString<S>
impl<S> Unpin for RiReferenceString<S>
impl<S> UnwindSafe for RiReferenceString<S>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
source§fn try_to_string(&self) -> Result<String, TryReserveError>
Available on crate feature alloc
only.
fn try_to_string(&self) -> Result<String, TryReserveError>
alloc
only.ToString::to_string
, but without panic on OOM.