Struct iri_string::types::RiAbsoluteString
source · [−]pub struct RiAbsoluteString<S> { /* private fields */ }
Expand description
An owned string of an absolute IRI without fragment part.
This corresponds to absolute-IRI
rule in RFC 3987
(and absolute-URI
rule in RFC 3986).
The rule for absolute-IRI
is scheme ":" ihier-part [ "?" iquery ]
.
In other words, this is RiString
without fragment part.
If you want to accept fragment part, use RiString
.
For details, see the document for RiAbsoluteStr
.
Enabled by alloc
or std
feature.
Implementations
sourceimpl<S: Spec> RiAbsoluteString<S>
impl<S: Spec> RiAbsoluteString<S>
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) -> &RiAbsoluteStr<S>
pub fn as_slice(&self) -> &RiAbsoluteStr<S>
Returns the borrowed IRI string slice.
This is equivalent to &*self
.
sourceimpl RiAbsoluteString<IriSpec>
impl RiAbsoluteString<IriSpec>
Conversion from an IRI into a URI.
sourcepub fn encode_to_uri(&mut self)
pub fn encode_to_uri(&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,
use encode_into_uri
method.
If you need more precise control over memory allocation and buffer
handling, use MappedToUri
type.
Examples
#[cfg(feature = "alloc")] {
use iri_string::types::IriAbsoluteString;
let mut iri = IriAbsoluteString::try_from("http://example.com/?alpha=\u{03B1}")?;
iri.encode_to_uri();
assert_eq!(iri, "http://example.com/?alpha=%CE%B1");
sourcepub fn encode_into_uri(self) -> UriAbsoluteString
pub fn encode_into_uri(self) -> UriAbsoluteString
Percent-encodes the IRI into a valid URI that identifies the equivalent resource.
If you want to modify the value rather than creating a new
URI string, use encode_to_uri
method.
If you need more precise control over memory allocation and buffer
handling, use MappedToUri
type.
Examples
#[cfg(feature = "alloc")] {
use iri_string::types::{IriAbsoluteString, UriAbsoluteString};
let iri = IriAbsoluteString::try_from("http://example.com/?alpha=\u{03B1}")?;
// Type annotation here is not necessary.
let uri: UriAbsoluteString = iri.encode_into_uri();
assert_eq!(uri, "http://example.com/?alpha=%CE%B1");
sourcepub fn try_into_uri(self) -> Result<UriAbsoluteString, IriAbsoluteString>
pub fn try_into_uri(self) -> Result<UriAbsoluteString, IriAbsoluteString>
Converts an IRI into a URI without modification, if possible.
Examples
use iri_string::types::{IriAbsoluteString, UriAbsoluteString};
let ascii_iri = IriAbsoluteString::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 = IriAbsoluteString::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 = RiAbsoluteStr<S>>
sourcepub fn normalize(&self) -> Result<RiAbsoluteString<S>, TaskError<Error>>
pub fn normalize(&self) -> Result<RiAbsoluteString<S>, TaskError<Error>>
Returns the normalized IRI.
Examples
use iri_string::types::IriAbsoluteStr;
let iri = IriAbsoluteStr::new("HTTP://example.COM/foo/./bar/%2e%2e/../baz?query")?;
let normalized = iri.normalize()?;
assert_eq!(normalized, "http://example.com/baz?query");
sourcepub fn scheme_str(&self) -> &str
pub fn scheme_str(&self) -> &str
Returns the scheme.
The following colon is truncated.
Examples
use iri_string::types::IriAbsoluteStr;
let iri = IriAbsoluteStr::new("http://example.com/pathpath?queryquery")?;
assert_eq!(iri.scheme_str(), "http");
Returns the authority.
The leading //
is truncated.
Examples
use iri_string::types::IriAbsoluteStr;
let iri = IriAbsoluteStr::new("http://example.com/pathpath?queryquery")?;
assert_eq!(iri.authority_str(), Some("example.com"));
use iri_string::types::IriAbsoluteStr;
let iri = IriAbsoluteStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
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::IriAbsoluteStr;
let iri = IriAbsoluteStr::new("http://example.com/pathpath?queryquery")?;
assert_eq!(iri.path_str(), "/pathpath");
use iri_string::types::IriAbsoluteStr;
let iri = IriAbsoluteStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.path_str(), "uuid:10db315b-fcd1-4428-aca8-15babc9a2da2");
sourcepub fn query_str(&self) -> Option<&str>
pub fn query_str(&self) -> Option<&str>
Returns the query.
The leading question mark (?
) is truncated.
Examples
use iri_string::types::IriAbsoluteStr;
let iri = IriAbsoluteStr::new("http://example.com/pathpath?queryquery")?;
assert_eq!(iri.query_str(), Some("queryquery"));
use iri_string::types::IriAbsoluteStr;
let iri = IriAbsoluteStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.query_str(), None);
Returns the authority components.
Examples
use iri_string::types::IriAbsoluteStr;
let iri = IriAbsoluteStr::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::IriAbsoluteStr;
let iri = IriAbsoluteStr::new("urn:uuid:10db315b-fcd1-4428-aca8-15babc9a2da2")?;
assert_eq!(iri.authority_str(), None);
sourcepub fn encode_to_uri(&self) -> UriAbsoluteString
pub fn encode_to_uri(&self) -> UriAbsoluteString
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::types::{IriAbsoluteStr, UriAbsoluteString};
let iri = IriAbsoluteStr::new("http://example.com/?alpha=\u{03B1}")?;
// Type annotation here is not necessary.
let uri: UriAbsoluteString = iri.encode_to_uri();
assert_eq!(uri, "http://example.com/?alpha=%CE%B1");
sourcepub fn as_uri(&self) -> Option<&UriAbsoluteStr>
pub fn as_uri(&self) -> Option<&UriAbsoluteStr>
Converts an IRI into a URI without modification, if possible.
This is semantically equivalent to
UriAbsoluteStr::new(self.as_str()).ok()
.
Examples
use iri_string::types::{IriAbsoluteStr, UriAbsoluteStr};
let ascii_iri = IriAbsoluteStr::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 = IriAbsoluteStr::new("http://example.com/?alpha=\u{03B1}")?;
assert_eq!(nonascii_iri.as_uri(), None);
Trait Implementations
sourceimpl<S: Spec> AsRef<RiAbsoluteStr<S>> for RiAbsoluteString<S>
impl<S: Spec> AsRef<RiAbsoluteStr<S>> for RiAbsoluteString<S>
sourcefn as_ref(&self) -> &RiAbsoluteStr<S>
fn as_ref(&self) -> &RiAbsoluteStr<S>
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl<S: Spec> AsRef<RiReferenceStr<S>> for RiAbsoluteString<S>
impl<S: Spec> AsRef<RiReferenceStr<S>> for RiAbsoluteString<S>
sourcefn as_ref(&self) -> &RiReferenceStr<S>
fn as_ref(&self) -> &RiReferenceStr<S>
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl<S: Spec> AsRef<RiStr<S>> for RiAbsoluteString<S>
impl<S: Spec> AsRef<RiStr<S>> for RiAbsoluteString<S>
sourceimpl<S: Spec> AsRef<str> for RiAbsoluteString<S>
impl<S: Spec> AsRef<str> for RiAbsoluteString<S>
sourceimpl<S: Spec> Borrow<RiAbsoluteStr<S>> for RiAbsoluteString<S>
impl<S: Spec> Borrow<RiAbsoluteStr<S>> for RiAbsoluteString<S>
sourcefn borrow(&self) -> &RiAbsoluteStr<S>
fn borrow(&self) -> &RiAbsoluteStr<S>
Immutably borrows from an owned value. Read more
sourceimpl<S: Spec> Borrow<str> for RiAbsoluteString<S>
impl<S: Spec> Borrow<str> for RiAbsoluteString<S>
sourceimpl<S: Spec> Clone for RiAbsoluteString<S>
impl<S: Spec> Clone for RiAbsoluteString<S>
sourceimpl<S: Spec> Debug for RiAbsoluteString<S>
impl<S: Spec> Debug for RiAbsoluteString<S>
sourceimpl<S: Spec> Deref for RiAbsoluteString<S>
impl<S: Spec> Deref for RiAbsoluteString<S>
type Target = RiAbsoluteStr<S>
type Target = RiAbsoluteStr<S>
The resulting type after dereferencing.
sourcefn deref(&self) -> &RiAbsoluteStr<S>
fn deref(&self) -> &RiAbsoluteStr<S>
Dereferences the value.
sourceimpl<'de, S: Spec> Deserialize<'de> for RiAbsoluteString<S>
impl<'de, S: Spec> Deserialize<'de> for RiAbsoluteString<S>
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<S: Spec> Display for RiAbsoluteString<S>
impl<S: Spec> Display for RiAbsoluteString<S>
sourceimpl<S: Spec> From<&'_ RiAbsoluteStr<S>> for RiAbsoluteString<S>
impl<S: Spec> From<&'_ RiAbsoluteStr<S>> for RiAbsoluteString<S>
sourcefn from(s: &RiAbsoluteStr<S>) -> Self
fn from(s: &RiAbsoluteStr<S>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<&'a RiAbsoluteString<IriSpec>> for MappedToUri<'a, IriAbsoluteStr>
impl<'a> From<&'a RiAbsoluteString<IriSpec>> for MappedToUri<'a, IriAbsoluteStr>
sourcefn from(iri: &'a IriAbsoluteString) -> Self
fn from(iri: &'a IriAbsoluteString) -> Self
Converts to this type from the input type.
sourceimpl<'a, S: Spec> From<&'a RiAbsoluteString<S>> for NormalizationTask<'a, RiAbsoluteStr<S>>
impl<'a, S: Spec> From<&'a RiAbsoluteString<S>> for NormalizationTask<'a, RiAbsoluteStr<S>>
sourcefn from(iri: &'a RiAbsoluteString<S>) -> Self
fn from(iri: &'a RiAbsoluteString<S>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<&'a RiAbsoluteString<UriSpec>> for MappedToUri<'a, UriAbsoluteStr>
impl<'a> From<&'a RiAbsoluteString<UriSpec>> for MappedToUri<'a, UriAbsoluteStr>
sourcefn from(iri: &'a UriAbsoluteString) -> Self
fn from(iri: &'a UriAbsoluteString) -> Self
Converts to this type from the input type.
sourceimpl<S: Spec> From<RiAbsoluteString<S>> for String
impl<S: Spec> From<RiAbsoluteString<S>> for String
sourcefn from(s: RiAbsoluteString<S>) -> Self
fn from(s: RiAbsoluteString<S>) -> Self
Converts to this type from the input type.
sourceimpl<S: Spec> From<RiAbsoluteString<S>> for RiString<S>
impl<S: Spec> From<RiAbsoluteString<S>> for RiString<S>
sourcefn from(s: RiAbsoluteString<S>) -> RiString<S>
fn from(s: RiAbsoluteString<S>) -> RiString<S>
Converts to this type from the input type.
sourceimpl<S: Spec> From<RiAbsoluteString<S>> for RiReferenceString<S>
impl<S: Spec> From<RiAbsoluteString<S>> for RiReferenceString<S>
sourcefn from(s: RiAbsoluteString<S>) -> RiReferenceString<S>
fn from(s: RiAbsoluteString<S>) -> RiReferenceString<S>
Converts to this type from the input type.
sourceimpl From<RiAbsoluteString<UriSpec>> for IriAbsoluteString
impl From<RiAbsoluteString<UriSpec>> for IriAbsoluteString
sourcefn from(uri: UriAbsoluteString) -> Self
fn from(uri: UriAbsoluteString) -> Self
Converts to this type from the input type.
sourceimpl<S: Spec> FromStr for RiAbsoluteString<S>
impl<S: Spec> FromStr for RiAbsoluteString<S>
sourceimpl<S: Spec> Hash for RiAbsoluteString<S>
impl<S: Spec> Hash for RiAbsoluteString<S>
sourceimpl<S: Spec> Ord for RiAbsoluteString<S>
impl<S: Spec> Ord for RiAbsoluteString<S>
sourceimpl<S: Spec, T: Spec> PartialEq<&'_ RiAbsoluteStr<S>> for RiAbsoluteString<T>
impl<S: Spec, T: Spec> PartialEq<&'_ RiAbsoluteStr<S>> for RiAbsoluteString<T>
sourceimpl<S: Spec, T: Spec> PartialEq<&'_ RiReferenceStr<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialEq<&'_ RiReferenceStr<T>> for RiAbsoluteString<S>
sourceimpl<S: Spec> PartialEq<&'_ str> for RiAbsoluteString<S>
impl<S: Spec> PartialEq<&'_ str> for RiAbsoluteString<S>
sourceimpl<S: Spec, T: Spec> PartialEq<Cow<'_, RiAbsoluteStr<S>>> for RiAbsoluteString<T>
impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiAbsoluteStr<S>>> for RiAbsoluteString<T>
sourceimpl<S: Spec, T: Spec> PartialEq<Cow<'_, RiReferenceStr<T>>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiReferenceStr<T>>> for RiAbsoluteString<S>
sourceimpl<S: Spec, T: Spec> PartialEq<RiAbsoluteStr<S>> for RiAbsoluteString<T>
impl<S: Spec, T: Spec> PartialEq<RiAbsoluteStr<S>> for RiAbsoluteString<T>
sourceimpl<S: Spec> PartialEq<RiAbsoluteString<S>> for str
impl<S: Spec> PartialEq<RiAbsoluteString<S>> for str
sourceimpl<S: Spec> PartialEq<RiAbsoluteString<S>> for &str
impl<S: Spec> PartialEq<RiAbsoluteString<S>> for &str
sourceimpl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<S>> for Cow<'_, RiReferenceStr<T>>
impl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<S>> for Cow<'_, RiReferenceStr<T>>
sourceimpl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<S>> for RiReferenceString<T>
sourceimpl<S: Spec> PartialEq<RiAbsoluteString<S>> for String
impl<S: Spec> PartialEq<RiAbsoluteString<S>> for String
sourceimpl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<S>> for RiReferenceStr<T>
impl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<S>> for RiReferenceStr<T>
sourceimpl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<S>> for &RiReferenceStr<T>
impl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<S>> for &RiReferenceStr<T>
sourceimpl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<T>> for RiAbsoluteString<S>
sourceimpl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<T>> for RiAbsoluteStr<S>
impl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<T>> for RiAbsoluteStr<S>
sourceimpl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<T>> for &RiAbsoluteStr<S>
impl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<T>> for &RiAbsoluteStr<S>
sourceimpl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<T>> for Cow<'_, RiAbsoluteStr<S>>
impl<S: Spec, T: Spec> PartialEq<RiAbsoluteString<T>> for Cow<'_, RiAbsoluteStr<S>>
sourceimpl<S: Spec, T: Spec> PartialEq<RiReferenceStr<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceStr<T>> for RiAbsoluteString<S>
sourceimpl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiAbsoluteString<S>
sourceimpl<S: Spec> PartialEq<String> for RiAbsoluteString<S>
impl<S: Spec> PartialEq<String> for RiAbsoluteString<S>
sourceimpl<S: Spec> PartialEq<str> for RiAbsoluteString<S>
impl<S: Spec> PartialEq<str> for RiAbsoluteString<S>
sourceimpl<S: Spec, T: Spec> PartialOrd<&'_ RiAbsoluteStr<S>> for RiAbsoluteString<T>
impl<S: Spec, T: Spec> PartialOrd<&'_ RiAbsoluteStr<S>> for RiAbsoluteString<T>
sourcefn partial_cmp(&self, o: &&RiAbsoluteStr<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<&'_ RiReferenceStr<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialOrd<&'_ RiReferenceStr<T>> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, o: &&RiReferenceStr<T>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<&'_ RiStr<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialOrd<&'_ RiStr<T>> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, o: &&RiStr<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &&RiStr<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec> PartialOrd<&'_ str> for RiAbsoluteString<S>
impl<S: Spec> PartialOrd<&'_ str> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, o: &&str) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiAbsoluteStr<S>>> for RiAbsoluteString<T>
impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiAbsoluteStr<S>>> for RiAbsoluteString<T>
sourcefn partial_cmp(&self, o: &Cow<'_, RiAbsoluteStr<S>>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiReferenceStr<T>>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiReferenceStr<T>>> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, o: &Cow<'_, RiReferenceStr<T>>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiStr<T>>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiStr<T>>> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, o: &Cow<'_, RiStr<T>>) -> Option<Ordering>
fn partial_cmp(&self, o: &Cow<'_, RiStr<T>>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec> PartialOrd<Cow<'_, str>> for RiAbsoluteString<S>
impl<S: Spec> PartialOrd<Cow<'_, str>> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, o: &Cow<'_, str>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteStr<S>> for RiAbsoluteString<T>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteStr<S>> for RiAbsoluteString<T>
sourcefn partial_cmp(&self, o: &RiAbsoluteStr<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec> PartialOrd<RiAbsoluteString<S>> for str
impl<S: Spec> PartialOrd<RiAbsoluteString<S>> for str
sourcefn partial_cmp(&self, o: &RiAbsoluteString<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec> PartialOrd<RiAbsoluteString<S>> for &str
impl<S: Spec> PartialOrd<RiAbsoluteString<S>> for &str
sourcefn partial_cmp(&self, o: &RiAbsoluteString<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for Cow<'_, RiReferenceStr<T>>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for Cow<'_, RiReferenceStr<T>>
sourcefn partial_cmp(&self, o: &RiAbsoluteString<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for RiReferenceString<T>
sourcefn partial_cmp(&self, o: &RiAbsoluteString<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec> PartialOrd<RiAbsoluteString<S>> for Cow<'_, str>
impl<S: Spec> PartialOrd<RiAbsoluteString<S>> for Cow<'_, str>
sourcefn partial_cmp(&self, o: &RiAbsoluteString<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec> PartialOrd<RiAbsoluteString<S>> for String
impl<S: Spec> PartialOrd<RiAbsoluteString<S>> for String
sourcefn partial_cmp(&self, o: &RiAbsoluteString<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for RiStr<T>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for RiStr<T>
sourcefn partial_cmp(&self, o: &RiAbsoluteString<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for &RiStr<T>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for &RiStr<T>
sourcefn partial_cmp(&self, o: &RiAbsoluteString<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for Cow<'_, RiStr<T>>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for Cow<'_, RiStr<T>>
sourcefn partial_cmp(&self, o: &RiAbsoluteString<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for RiString<T>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for RiString<T>
sourcefn partial_cmp(&self, o: &RiAbsoluteString<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for RiReferenceStr<T>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for RiReferenceStr<T>
sourcefn partial_cmp(&self, o: &RiAbsoluteString<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for &RiReferenceStr<T>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<S>> for &RiReferenceStr<T>
sourcefn partial_cmp(&self, o: &RiAbsoluteString<S>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<T>> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, other: &RiAbsoluteString<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &RiAbsoluteString<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<T>> for RiAbsoluteStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<T>> for RiAbsoluteStr<S>
sourcefn partial_cmp(&self, o: &RiAbsoluteString<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiAbsoluteString<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<T>> for &RiAbsoluteStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<T>> for &RiAbsoluteStr<S>
sourcefn partial_cmp(&self, o: &RiAbsoluteString<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiAbsoluteString<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<T>> for Cow<'_, RiAbsoluteStr<S>>
impl<S: Spec, T: Spec> PartialOrd<RiAbsoluteString<T>> for Cow<'_, RiAbsoluteStr<S>>
sourcefn partial_cmp(&self, o: &RiAbsoluteString<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiAbsoluteString<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiReferenceStr<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceStr<T>> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, o: &RiReferenceStr<T>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, o: &RiReferenceString<T>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiStr<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialOrd<RiStr<T>> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, o: &RiStr<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiStr<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec, T: Spec> PartialOrd<RiString<T>> for RiAbsoluteString<S>
impl<S: Spec, T: Spec> PartialOrd<RiString<T>> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, o: &RiString<T>) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec> PartialOrd<String> for RiAbsoluteString<S>
impl<S: Spec> PartialOrd<String> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, o: &String) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S: Spec> PartialOrd<str> for RiAbsoluteString<S>
impl<S: Spec> PartialOrd<str> for RiAbsoluteString<S>
sourcefn partial_cmp(&self, o: &str) -> Option<Ordering>
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 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<S> Serialize for RiAbsoluteString<S> where
S: Spec,
impl<S> Serialize for RiAbsoluteString<S> where
S: Spec,
sourceimpl<S: Spec> TryFrom<&'_ str> for RiAbsoluteString<S>
impl<S: Spec> TryFrom<&'_ str> for RiAbsoluteString<S>
sourceimpl<S: Spec> TryFrom<RiReferenceString<S>> for RiAbsoluteString<S>
impl<S: Spec> TryFrom<RiReferenceString<S>> for RiAbsoluteString<S>
type Error = CreationError<RiReferenceString<S>>
type Error = CreationError<RiReferenceString<S>>
The type returned in the event of a conversion error.
sourcefn try_from(s: RiReferenceString<S>) -> Result<Self, Self::Error>
fn try_from(s: RiReferenceString<S>) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl<S: Spec> TryFrom<RiString<S>> for RiAbsoluteString<S>
impl<S: Spec> TryFrom<RiString<S>> for RiAbsoluteString<S>
sourceimpl<S: Spec> TryFrom<String> for RiAbsoluteString<S>
impl<S: Spec> TryFrom<String> for RiAbsoluteString<S>
impl<S: Spec> Eq for RiAbsoluteString<S>
Auto Trait Implementations
impl<S> RefUnwindSafe for RiAbsoluteString<S>
impl<S> Send for RiAbsoluteString<S>
impl<S> Sync for RiAbsoluteString<S>
impl<S> Unpin for RiAbsoluteString<S>
impl<S> UnwindSafe for RiAbsoluteString<S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more