Struct iri_string::types::RiRelativeStr
source · pub struct RiRelativeStr<S> { /* private fields */ }
Expand description
A borrowed slice of a relative IRI reference.
This corresponds to irelative-ref
rule in RFC 3987
(and relative-ref
rule in RFC 3986).
The rule for irelative-ref
is irelative-part [ "?" iquery ] [ "#" ifragment ]
.
§Valid values
This type can have a relative IRI reference.
assert!(IriRelativeStr::new("foo").is_ok());
assert!(IriRelativeStr::new("foo/bar").is_ok());
assert!(IriRelativeStr::new("/foo").is_ok());
assert!(IriRelativeStr::new("//foo/bar").is_ok());
assert!(IriRelativeStr::new("?foo").is_ok());
assert!(IriRelativeStr::new("#foo").is_ok());
assert!(IriRelativeStr::new("foo/bar?baz#qux").is_ok());
// The first path component can have colon if the path is absolute.
assert!(IriRelativeStr::new("/foo:bar/").is_ok());
// Second or following path components can have colon.
assert!(IriRelativeStr::new("foo/bar://baz/").is_ok());
assert!(IriRelativeStr::new("./foo://bar").is_ok());
Absolute form of a reference is not allowed.
assert!(IriRelativeStr::new("https://example.com/").is_err());
// The first path component cannot have colon, if the path is not absolute.
assert!(IriRelativeStr::new("foo:bar").is_err());
assert!(IriRelativeStr::new("foo:").is_err());
assert!(IriRelativeStr::new("foo:/").is_err());
assert!(IriRelativeStr::new("foo://").is_err());
assert!(IriRelativeStr::new("foo:///").is_err());
assert!(IriRelativeStr::new("foo:////").is_err());
assert!(IriRelativeStr::new("foo://///").is_err());
Some characters and sequences cannot used in an IRI reference.
// `<` and `>` cannot directly appear in a relative IRI reference.
assert!(IriRelativeStr::new("<not allowed>").is_err());
// Broken percent encoding cannot appear in a relative IRI reference.
assert!(IriRelativeStr::new("%").is_err());
assert!(IriRelativeStr::new("%GG").is_err());
Implementations§
source§impl<S: Spec> RiRelativeStr<S>
impl<S: Spec> RiRelativeStr<S>
sourcepub unsafe fn new_unchecked(s: &str) -> &Self
pub 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.
source§impl<S: Spec> RiRelativeStr<S>
impl<S: Spec> RiRelativeStr<S>
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::IriRelativeStr;
let iri = IriRelativeStr::new("//user:password@example.com/path?query")?;
let masked = iri.mask_password();
assert_eq!(masked.to_dedicated_string(), "//user:@example.com/path?query");
assert_eq!(
masked.replace_password("${password}").to_string(),
"//user:${password}@example.com/path?query"
);
source§impl<S: Spec> RiRelativeStr<S>
impl<S: Spec> RiRelativeStr<S>
Components getters.
Returns the authority.
The leading //
is truncated.
§Examples
use iri_string::types::IriRelativeStr;
let iri = IriRelativeStr::new("//example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.authority_str(), Some("example.com"));
use iri_string::types::IriRelativeStr;
let iri = IriRelativeStr::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::IriRelativeStr;
let iri = IriRelativeStr::new("//example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.path_str(), "/pathpath");
use iri_string::types::IriRelativeStr;
let iri = IriRelativeStr::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, IriRelativeStr};
let iri = IriRelativeStr::new("//example.com/pathpath?queryquery#fragfrag")?;
let query = IriQueryStr::new("queryquery")?;
assert_eq!(iri.query(), Some(query));
use iri_string::types::{IriQueryStr, IriRelativeStr};
let iri = IriRelativeStr::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 in a raw string slice.
The leading question mark (?
) is truncated.
§Examples
use iri_string::types::IriRelativeStr;
let iri = IriRelativeStr::new("//example.com/pathpath?queryquery#fragfrag")?;
assert_eq!(iri.query_str(), Some("queryquery"));
use iri_string::types::IriRelativeStr;
let iri = IriRelativeStr::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 = IriRelativeStr::new("?foo#bar")?;
let fragment = IriFragmentStr::new("bar")?;
assert_eq!(iri.fragment(), Some(fragment));
let iri = IriRelativeStr::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 = IriRelativeStr::new("#")?;
let fragment = IriFragmentStr::new("")?;
assert_eq!(iri.fragment(), Some(fragment));
If the IRI has no fragment, None
is returned.
let iri = IriRelativeStr::new("")?;
assert_eq!(iri.fragment(), None);
Returns the authority components.
§Examples
use iri_string::types::IriRelativeStr;
let iri = IriRelativeStr::new("//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::IriRelativeStr;
let iri = IriRelativeStr::new("foo//bar:baz")?;
assert_eq!(iri.authority_str(), None);
source§impl RiRelativeStr<IriSpec>
impl RiRelativeStr<IriSpec>
Conversion from an IRI into a URI.
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::{IriRelativeStr, UriRelativeString};
let iri = IriRelativeStr::new("../?alpha=\u{03B1}")?;
// Type annotation here is not necessary.
let uri: UriRelativeString = iri.encode_to_uri().to_dedicated_string();
assert_eq!(uri, "../?alpha=%CE%B1");
sourcepub fn as_uri(&self) -> Option<&UriRelativeStr>
pub fn as_uri(&self) -> Option<&UriRelativeStr>
Converts an IRI into a URI without modification, if possible.
This is semantically equivalent to
UriRelativeStr::new(self.as_str()).ok()
.
§Examples
use iri_string::types::{IriRelativeStr, UriRelativeStr};
let ascii_iri = IriRelativeStr::new("../?alpha=%CE%B1")?;
assert_eq!(
ascii_iri.as_uri().map(AsRef::as_ref),
Some("../?alpha=%CE%B1")
);
let nonascii_iri = IriRelativeStr::new("../?alpha=\u{03B1}")?;
assert_eq!(nonascii_iri.as_uri(), None);
Trait Implementations§
source§impl<S: Spec> AsRef<RiReferenceStr<S>> for RiRelativeStr<S>
impl<S: Spec> AsRef<RiReferenceStr<S>> for RiRelativeStr<S>
source§fn as_ref(&self) -> &RiReferenceStr<S>
fn as_ref(&self) -> &RiReferenceStr<S>
source§impl AsRef<RiRelativeStr<IriSpec>> for UriRelativeStr
impl AsRef<RiRelativeStr<IriSpec>> for UriRelativeStr
source§fn as_ref(&self) -> &IriRelativeStr
fn as_ref(&self) -> &IriRelativeStr
source§impl AsRef<RiRelativeStr<IriSpec>> for UriRelativeString
impl AsRef<RiRelativeStr<IriSpec>> for UriRelativeString
source§fn as_ref(&self) -> &IriRelativeStr
fn as_ref(&self) -> &IriRelativeStr
source§impl<S: Spec> AsRef<RiRelativeStr<S>> for RiRelativeStr<S>
impl<S: Spec> AsRef<RiRelativeStr<S>> for RiRelativeStr<S>
source§fn as_ref(&self) -> &RiRelativeStr<S>
fn as_ref(&self) -> &RiRelativeStr<S>
source§impl<S: Spec> AsRef<RiRelativeStr<S>> for RiRelativeString<S>
impl<S: Spec> AsRef<RiRelativeStr<S>> for RiRelativeString<S>
source§fn as_ref(&self) -> &RiRelativeStr<S>
fn as_ref(&self) -> &RiRelativeStr<S>
source§impl<S: Spec> Borrow<RiRelativeStr<S>> for RiRelativeString<S>
impl<S: Spec> Borrow<RiRelativeStr<S>> for RiRelativeString<S>
source§fn borrow(&self) -> &RiRelativeStr<S>
fn borrow(&self) -> &RiRelativeStr<S>
source§impl<S: Spec> Debug for RiRelativeStr<S>
impl<S: Spec> Debug for RiRelativeStr<S>
source§impl<'de: 'a, 'a, S: 'de + Spec> Deserialize<'de> for &'a RiRelativeStr<S>
Available on crate feature serde
only.
impl<'de: 'a, 'a, S: 'de + Spec> Deserialize<'de> for &'a RiRelativeStr<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 RiRelativeStr<S>
impl<S: Spec> Display for RiRelativeStr<S>
source§impl<'a, S: Spec> From<&'a RiRelativeStr<S>> for &'a RiReferenceStr<S>
impl<'a, S: Spec> From<&'a RiRelativeStr<S>> for &'a RiReferenceStr<S>
source§fn from(s: &'a RiRelativeStr<S>) -> &'a RiReferenceStr<S>
fn from(s: &'a RiRelativeStr<S>) -> &'a RiReferenceStr<S>
source§impl<'a, S: Spec> From<&'a RiRelativeStr<S>> for &'a str
impl<'a, S: Spec> From<&'a RiRelativeStr<S>> for &'a str
source§fn from(s: &'a RiRelativeStr<S>) -> &'a str
fn from(s: &'a RiRelativeStr<S>) -> &'a str
source§impl<S: Spec> From<&RiRelativeStr<S>> for Arc<RiRelativeStr<S>>
Available on crate feature alloc
only.
impl<S: Spec> From<&RiRelativeStr<S>> for Arc<RiRelativeStr<S>>
alloc
only.source§fn from(s: &RiRelativeStr<S>) -> Self
fn from(s: &RiRelativeStr<S>) -> Self
source§impl<S: Spec> From<&RiRelativeStr<S>> for Box<RiRelativeStr<S>>
Available on crate feature alloc
only.
impl<S: Spec> From<&RiRelativeStr<S>> for Box<RiRelativeStr<S>>
alloc
only.source§fn from(s: &RiRelativeStr<S>) -> Self
fn from(s: &RiRelativeStr<S>) -> Self
source§impl<'a, S: Spec> From<&'a RiRelativeStr<S>> for Cow<'a, RiRelativeStr<S>>
impl<'a, S: Spec> From<&'a RiRelativeStr<S>> for Cow<'a, RiRelativeStr<S>>
source§fn from(s: &'a RiRelativeStr<S>) -> Self
fn from(s: &'a RiRelativeStr<S>) -> Self
source§impl<'a, S: Spec> From<&'a RiRelativeStr<S>> for MappedToUri<'a, RiRelativeStr<S>>
impl<'a, S: Spec> From<&'a RiRelativeStr<S>> for MappedToUri<'a, RiRelativeStr<S>>
source§fn from(iri: &'a RiRelativeStr<S>) -> Self
fn from(iri: &'a RiRelativeStr<S>) -> Self
source§impl<S: Spec> From<&RiRelativeStr<S>> for Rc<RiRelativeStr<S>>
Available on crate feature alloc
only.
impl<S: Spec> From<&RiRelativeStr<S>> for Rc<RiRelativeStr<S>>
alloc
only.source§fn from(s: &RiRelativeStr<S>) -> Self
fn from(s: &RiRelativeStr<S>) -> Self
source§impl<S: Spec> From<&RiRelativeStr<S>> for RiRelativeString<S>
impl<S: Spec> From<&RiRelativeStr<S>> for RiRelativeString<S>
source§fn from(s: &RiRelativeStr<S>) -> Self
fn from(s: &RiRelativeStr<S>) -> Self
source§impl<S: Spec> From<RiRelativeString<S>> for Box<RiRelativeStr<S>>
impl<S: Spec> From<RiRelativeString<S>> for Box<RiRelativeStr<S>>
source§fn from(s: RiRelativeString<S>) -> Box<RiRelativeStr<S>>
fn from(s: RiRelativeString<S>) -> Box<RiRelativeStr<S>>
source§impl<S: Spec> Hash for RiRelativeStr<S>
impl<S: Spec> Hash for RiRelativeStr<S>
source§impl<S: Spec> Ord for RiRelativeStr<S>
impl<S: Spec> Ord for RiRelativeStr<S>
source§impl<S: Spec, T: Spec> PartialEq<&RiReferenceStr<T>> for RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<&RiReferenceStr<T>> for RiRelativeStr<S>
source§fn eq(&self, o: &&RiReferenceStr<T>) -> bool
fn eq(&self, o: &&RiReferenceStr<T>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for Cow<'_, RiReferenceStr<T>>
impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for Cow<'_, RiReferenceStr<T>>
source§fn eq(&self, o: &&RiRelativeStr<S>) -> bool
fn eq(&self, o: &&RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for Cow<'_, RiRelativeStr<T>>
impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for Cow<'_, RiRelativeStr<T>>
source§fn eq(&self, o: &&RiRelativeStr<S>) -> bool
fn eq(&self, o: &&RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec> PartialEq<&RiRelativeStr<S>> for Cow<'_, str>
impl<S: Spec> PartialEq<&RiRelativeStr<S>> for Cow<'_, str>
source§fn eq(&self, o: &&RiRelativeStr<S>) -> bool
fn eq(&self, o: &&RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for RiReferenceStr<T>
impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for RiReferenceStr<T>
source§fn eq(&self, o: &&RiRelativeStr<S>) -> bool
fn eq(&self, o: &&RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for RiReferenceString<T>
source§fn eq(&self, o: &&RiRelativeStr<S>) -> bool
fn eq(&self, o: &&RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for RiRelativeStr<T>
impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for RiRelativeStr<T>
source§fn eq(&self, o: &&RiRelativeStr<S>) -> bool
fn eq(&self, o: &&RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for RiRelativeString<T>
impl<S: Spec, T: Spec> PartialEq<&RiRelativeStr<S>> for RiRelativeString<T>
source§fn eq(&self, o: &&RiRelativeStr<S>) -> bool
fn eq(&self, o: &&RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec> PartialEq<&RiRelativeStr<S>> for str
impl<S: Spec> PartialEq<&RiRelativeStr<S>> for str
source§fn eq(&self, o: &&RiRelativeStr<S>) -> bool
fn eq(&self, o: &&RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiReferenceStr<T>>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiReferenceStr<T>>> for &RiRelativeStr<S>
source§impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiReferenceStr<T>>> for RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiReferenceStr<T>>> for RiRelativeStr<S>
source§impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiRelativeStr<T>>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiRelativeStr<T>>> for &RiRelativeStr<S>
source§impl<S: Spec> PartialEq<Cow<'_, str>> for &RiRelativeStr<S>
impl<S: Spec> PartialEq<Cow<'_, str>> for &RiRelativeStr<S>
source§impl<S: Spec> PartialEq<Cow<'_, str>> for RiRelativeStr<S>
impl<S: Spec> PartialEq<Cow<'_, str>> for RiRelativeStr<S>
source§impl<S: Spec, T: Spec> PartialEq<RiReferenceStr<T>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceStr<T>> for &RiRelativeStr<S>
source§fn eq(&self, o: &RiReferenceStr<T>) -> bool
fn eq(&self, o: &RiReferenceStr<T>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<RiReferenceStr<T>> for RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceStr<T>> for RiRelativeStr<S>
source§fn eq(&self, o: &RiReferenceStr<T>) -> bool
fn eq(&self, o: &RiReferenceStr<T>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for &RiRelativeStr<S>
source§fn eq(&self, o: &RiReferenceString<T>) -> bool
fn eq(&self, o: &RiReferenceString<T>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<RiReferenceString<T>> for RiRelativeStr<S>
source§fn eq(&self, o: &RiReferenceString<T>) -> bool
fn eq(&self, o: &RiReferenceString<T>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<S>> for &RiReferenceStr<T>
impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<S>> for &RiReferenceStr<T>
source§fn eq(&self, o: &RiRelativeStr<S>) -> bool
fn eq(&self, o: &RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec> PartialEq<RiRelativeStr<S>> for &str
impl<S: Spec> PartialEq<RiRelativeStr<S>> for &str
source§fn eq(&self, o: &RiRelativeStr<S>) -> bool
fn eq(&self, o: &RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<S>> for Cow<'_, RiReferenceStr<T>>
impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<S>> for Cow<'_, RiReferenceStr<T>>
source§fn eq(&self, o: &RiRelativeStr<S>) -> bool
fn eq(&self, o: &RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec> PartialEq<RiRelativeStr<S>> for Cow<'_, str>
impl<S: Spec> PartialEq<RiRelativeStr<S>> for Cow<'_, str>
source§fn eq(&self, o: &RiRelativeStr<S>) -> bool
fn eq(&self, o: &RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<S>> for RiReferenceStr<T>
impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<S>> for RiReferenceStr<T>
source§fn eq(&self, o: &RiRelativeStr<S>) -> bool
fn eq(&self, o: &RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<S>> for RiReferenceString<T>
source§fn eq(&self, o: &RiRelativeStr<S>) -> bool
fn eq(&self, o: &RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<S>> for RiRelativeString<T>
impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<S>> for RiRelativeString<T>
source§fn eq(&self, o: &RiRelativeStr<S>) -> bool
fn eq(&self, o: &RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec> PartialEq<RiRelativeStr<S>> for str
impl<S: Spec> PartialEq<RiRelativeStr<S>> for str
source§fn eq(&self, o: &RiRelativeStr<S>) -> bool
fn eq(&self, o: &RiRelativeStr<S>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<T>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<RiRelativeStr<T>> for &RiRelativeStr<S>
source§fn eq(&self, o: &RiRelativeStr<T>) -> bool
fn eq(&self, o: &RiRelativeStr<T>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<RiRelativeString<T>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<RiRelativeString<T>> for &RiRelativeStr<S>
source§fn eq(&self, o: &RiRelativeString<T>) -> bool
fn eq(&self, o: &RiRelativeString<T>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec, T: Spec> PartialEq<RiRelativeString<T>> for RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialEq<RiRelativeString<T>> for RiRelativeStr<S>
source§fn eq(&self, o: &RiRelativeString<T>) -> bool
fn eq(&self, o: &RiRelativeString<T>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<S: Spec> PartialEq for RiRelativeStr<S>
impl<S: Spec> PartialEq for RiRelativeStr<S>
source§impl<S: Spec, T: Spec> PartialOrd<&RiReferenceStr<T>> for RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<&RiReferenceStr<T>> for RiRelativeStr<S>
source§fn partial_cmp(&self, o: &&RiReferenceStr<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &&RiReferenceStr<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for Cow<'_, RiReferenceStr<T>>
impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for Cow<'_, RiReferenceStr<T>>
source§fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for Cow<'_, RiRelativeStr<T>>
impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for Cow<'_, RiRelativeStr<T>>
source§fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec> PartialOrd<&RiRelativeStr<S>> for Cow<'_, str>
impl<S: Spec> PartialOrd<&RiRelativeStr<S>> for Cow<'_, str>
source§fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for RiReferenceStr<T>
impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for RiReferenceStr<T>
source§fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for RiReferenceString<T>
source§fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for RiRelativeStr<T>
impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for RiRelativeStr<T>
source§fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for RiRelativeString<T>
impl<S: Spec, T: Spec> PartialOrd<&RiRelativeStr<S>> for RiRelativeString<T>
source§fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec> PartialOrd<&RiRelativeStr<S>> for str
impl<S: Spec> PartialOrd<&RiRelativeStr<S>> for str
source§fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &&RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec> PartialOrd<&str> for RiRelativeStr<S>
impl<S: Spec> PartialOrd<&str> for RiRelativeStr<S>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiReferenceStr<T>>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiReferenceStr<T>>> for &RiRelativeStr<S>
source§fn partial_cmp(&self, o: &Cow<'_, RiReferenceStr<T>>) -> Option<Ordering>
fn partial_cmp(&self, o: &Cow<'_, RiReferenceStr<T>>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiReferenceStr<T>>> for RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiReferenceStr<T>>> for RiRelativeStr<S>
source§fn partial_cmp(&self, o: &Cow<'_, RiReferenceStr<T>>) -> Option<Ordering>
fn partial_cmp(&self, o: &Cow<'_, RiReferenceStr<T>>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiRelativeStr<T>>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiRelativeStr<T>>> for &RiRelativeStr<S>
source§fn partial_cmp(&self, o: &Cow<'_, RiRelativeStr<T>>) -> Option<Ordering>
fn partial_cmp(&self, o: &Cow<'_, RiRelativeStr<T>>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec> PartialOrd<Cow<'_, str>> for &RiRelativeStr<S>
impl<S: Spec> PartialOrd<Cow<'_, str>> for &RiRelativeStr<S>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec> PartialOrd<Cow<'_, str>> for RiRelativeStr<S>
impl<S: Spec> PartialOrd<Cow<'_, str>> for RiRelativeStr<S>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<RiReferenceStr<T>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceStr<T>> for &RiRelativeStr<S>
source§fn partial_cmp(&self, o: &RiReferenceStr<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiReferenceStr<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<RiReferenceStr<T>> for RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceStr<T>> for RiRelativeStr<S>
source§fn partial_cmp(&self, o: &RiReferenceStr<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiReferenceStr<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for &RiRelativeStr<S>
source§fn partial_cmp(&self, o: &RiReferenceString<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiReferenceString<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiReferenceString<T>> for RiRelativeStr<S>
source§fn partial_cmp(&self, o: &RiReferenceString<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiReferenceString<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<S>> for &RiReferenceStr<T>
impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<S>> for &RiReferenceStr<T>
source§fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec> PartialOrd<RiRelativeStr<S>> for &str
impl<S: Spec> PartialOrd<RiRelativeStr<S>> for &str
source§fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<S>> for Cow<'_, RiReferenceStr<T>>
impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<S>> for Cow<'_, RiReferenceStr<T>>
source§fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec> PartialOrd<RiRelativeStr<S>> for Cow<'_, str>
impl<S: Spec> PartialOrd<RiRelativeStr<S>> for Cow<'_, str>
source§fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<S>> for RiReferenceStr<T>
impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<S>> for RiReferenceStr<T>
source§fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<S>> for RiReferenceString<T>
impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<S>> for RiReferenceString<T>
source§fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<S>> for RiRelativeString<T>
impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<S>> for RiRelativeString<T>
source§fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec> PartialOrd<RiRelativeStr<S>> for str
impl<S: Spec> PartialOrd<RiRelativeStr<S>> for str
source§fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiRelativeStr<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<T>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiRelativeStr<T>> for &RiRelativeStr<S>
source§fn partial_cmp(&self, o: &RiRelativeStr<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiRelativeStr<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<RiRelativeString<T>> for &RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiRelativeString<T>> for &RiRelativeStr<S>
source§fn partial_cmp(&self, o: &RiRelativeString<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiRelativeString<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec, T: Spec> PartialOrd<RiRelativeString<T>> for RiRelativeStr<S>
impl<S: Spec, T: Spec> PartialOrd<RiRelativeString<T>> for RiRelativeStr<S>
source§fn partial_cmp(&self, o: &RiRelativeString<T>) -> Option<Ordering>
fn partial_cmp(&self, o: &RiRelativeString<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec> PartialOrd<str> for &RiRelativeStr<S>
impl<S: Spec> PartialOrd<str> for &RiRelativeStr<S>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec> PartialOrd<str> for RiRelativeStr<S>
impl<S: Spec> PartialOrd<str> for RiRelativeStr<S>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<S: Spec> PartialOrd for RiRelativeStr<S>
impl<S: Spec> PartialOrd for RiRelativeStr<S>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more