Struct iri_string::types::RiQueryStr

source ·
pub struct RiQueryStr<S> { /* private fields */ }
Expand description

A borrowed slice of an IRI query (i.e. after the first ? and before the first #).

This corresponds to iquery rule in RFC 3987 (and query rule in RFC 3986). The rule for ifragment is *( ipchar / iprivate / "/" / "?" ).

§Valid values

This type can have an IRI fragment. Note that the IRI foo://bar/baz#qux has the fragment qux, not #qux.

assert!(IriFragmentStr::new("").is_ok());
assert!(IriFragmentStr::new("foo").is_ok());
assert!(IriFragmentStr::new("foo/bar").is_ok());
assert!(IriFragmentStr::new("/foo/bar").is_ok());
assert!(IriFragmentStr::new("//foo/bar").is_ok());
assert!(IriFragmentStr::new("https://user:pass@example.com:8080").is_ok());
assert!(IriFragmentStr::new("https://example.com/").is_ok());

Some characters and sequences cannot used in a fragment.

// `<` and `>` cannot directly appear in an IRI reference.
assert!(IriFragmentStr::new("<not allowed>").is_err());
// Broken percent encoding cannot appear in an IRI reference.
assert!(IriFragmentStr::new("%").is_err());
assert!(IriFragmentStr::new("%GG").is_err());
// Hash sign `#` cannot appear in an IRI fragment.
assert!(IriFragmentStr::new("#hash").is_err());
use iri_string::types::IriQueryStr;
assert!(IriQueryStr::new("").is_ok());
assert!(IriQueryStr::new("foo").is_ok());
assert!(IriQueryStr::new("foo/bar").is_ok());
assert!(IriQueryStr::new("/foo/bar").is_ok());
assert!(IriQueryStr::new("//foo/bar").is_ok());
assert!(IriQueryStr::new("https://user:pass@example.com:8080").is_ok());
assert!(IriQueryStr::new("https://example.com/").is_ok());
// Question sign `?` can appear in an IRI query.
assert!(IriQueryStr::new("query?again").is_ok());

Some characters and sequences cannot used in a query.

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

Implementations§

source§

impl<S: Spec> RiQueryStr<S>

source

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

Creates a new string.

source

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

pub fn as_str(&self) -> &str

Returns &str.

source

pub fn len(&self) -> usize

Returns the string length.

source

pub fn is_empty(&self) -> bool

Returns whether the string is empty.

source§

impl<S: Spec> RiQueryStr<S>

source

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

Creates a new &RiQueryStr from the query part prefixed by ?.

§Examples
assert!(IriQueryStr::from_prefixed("?").is_ok());
assert!(IriQueryStr::from_prefixed("?foo").is_ok());
assert!(IriQueryStr::from_prefixed("?foo/bar").is_ok());
assert!(IriQueryStr::from_prefixed("?/foo/bar").is_ok());
assert!(IriQueryStr::from_prefixed("?//foo/bar").is_ok());
assert!(IriQueryStr::from_prefixed("?https://user:pass@example.com:8080").is_ok());
assert!(IriQueryStr::from_prefixed("?https://example.com/").is_ok());
// Question sign `?` can appear in an IRI query.
assert!(IriQueryStr::from_prefixed("?query?again").is_ok());

// `<` and `>` cannot directly appear in an IRI.
assert!(IriQueryStr::from_prefixed("?<not allowed>").is_err());
// Broken percent encoding cannot appear in an IRI.
assert!(IriQueryStr::new("?%").is_err());
assert!(IriQueryStr::new("?%GG").is_err());
// `?` prefix is expected.
assert!(IriQueryStr::from_prefixed("").is_err());
assert!(IriQueryStr::from_prefixed("foo").is_err());
// Hash sign `#` cannot appear in an IRI query.
assert!(IriQueryStr::from_prefixed("?#hash").is_err());
source§

impl RiQueryStr<IriSpec>

Conversion from an IRI into a URI.

source

pub fn encode_to_uri(&self) -> MappedToUri<'_, Self>

Percent-encodes the IRI into a valid URI that identifies the equivalent resource.

If you need more precise control over memory allocation and buffer handling, use MappedToUri type.

§Examples
use iri_string::format::ToDedicatedString;
use iri_string::types::{IriQueryStr, UriQueryString};

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

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

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

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

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

let ascii_iri = IriQueryStr::new("alpha-is-%CE%B1")?;
assert_eq!(
    ascii_iri.as_uri().map(AsRef::as_ref),
    Some("alpha-is-%CE%B1")
);

let nonascii_iri = IriQueryStr::new("alpha-is-\u{03B1}")?;
assert_eq!(nonascii_iri.as_uri(), None);

Trait Implementations§

source§

impl AsRef<RiQueryStr<IriSpec>> for UriQueryStr

source§

fn as_ref(&self) -> &IriQueryStr

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

impl AsRef<RiQueryStr<IriSpec>> for UriQueryString

source§

fn as_ref(&self) -> &IriQueryStr

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

impl<S: Spec> AsRef<RiQueryStr<S>> for RiQueryStr<S>

source§

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

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

impl<S: Spec> AsRef<RiQueryStr<S>> for RiQueryString<S>

source§

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

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

impl<S: Spec> AsRef<str> for RiQueryStr<S>

source§

fn as_ref(&self) -> &str

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

impl<S: Spec> Borrow<RiQueryStr<S>> for RiQueryString<S>

source§

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

Immutably borrows from an owned value. Read more
source§

impl<S: Spec> Debug for RiQueryStr<S>

source§

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

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

impl<'de: 'a, 'a, S: 'de + Spec> Deserialize<'de> for &'a RiQueryStr<S>

Available on crate feature serde only.
source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<S: Spec> Display for RiQueryStr<S>

source§

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

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

impl<'a, S: Spec> From<&'a RiQueryStr<S>> for &'a str

source§

fn from(s: &'a RiQueryStr<S>) -> &'a str

Converts to this type from the input type.
source§

impl<S: Spec> From<&RiQueryStr<S>> for Arc<RiQueryStr<S>>

Available on crate feature alloc only.
source§

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

Converts to this type from the input type.
source§

impl<S: Spec> From<&RiQueryStr<S>> for Box<RiQueryStr<S>>

Available on crate feature alloc only.
source§

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

Converts to this type from the input type.
source§

impl<'a, S: Spec> From<&'a RiQueryStr<S>> for Cow<'a, RiQueryStr<S>>

source§

fn from(s: &'a RiQueryStr<S>) -> Self

Converts to this type from the input type.
source§

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

source§

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

Converts to this type from the input type.
source§

impl<S: Spec> From<&RiQueryStr<S>> for Rc<RiQueryStr<S>>

Available on crate feature alloc only.
source§

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

Converts to this type from the input type.
source§

impl<S: Spec> From<&RiQueryStr<S>> for RiQueryString<S>

source§

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

Converts to this type from the input type.
source§

impl<S: Spec> From<RiQueryString<S>> for Box<RiQueryStr<S>>

source§

fn from(s: RiQueryString<S>) -> Box<RiQueryStr<S>>

Converts to this type from the input type.
source§

impl<S: Spec> Hash for RiQueryStr<S>

source§

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

Feeds this value into the given Hasher. Read more
source§

impl<S: Spec> Ord for RiQueryStr<S>

source§

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

This method returns an Ordering between self and other. Read more
source§

impl<S: Spec, T: Spec> PartialEq<&RiQueryStr<S>> for Cow<'_, RiQueryStr<T>>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec> PartialEq<&RiQueryStr<S>> for Cow<'_, str>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec, T: Spec> PartialEq<&RiQueryStr<S>> for RiQueryStr<T>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec, T: Spec> PartialEq<&RiQueryStr<S>> for RiQueryString<T>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec> PartialEq<&RiQueryStr<S>> for str

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec> PartialEq<&str> for RiQueryStr<S>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec, T: Spec> PartialEq<Cow<'_, RiQueryStr<T>>> for &RiQueryStr<S>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec> PartialEq<Cow<'_, str>> for &RiQueryStr<S>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec> PartialEq<Cow<'_, str>> for RiQueryStr<S>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec> PartialEq<RiQueryStr<S>> for &str

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec> PartialEq<RiQueryStr<S>> for Cow<'_, str>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec, T: Spec> PartialEq<RiQueryStr<S>> for RiQueryString<T>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec> PartialEq<RiQueryStr<S>> for str

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec, T: Spec> PartialEq<RiQueryStr<T>> for &RiQueryStr<S>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec, T: Spec> PartialEq<RiQueryString<T>> for &RiQueryStr<S>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec, T: Spec> PartialEq<RiQueryString<T>> for RiQueryStr<S>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec> PartialEq<str> for &RiQueryStr<S>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec> PartialEq<str> for RiQueryStr<S>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec> PartialEq for RiQueryStr<S>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<S: Spec, T: Spec> PartialOrd<&RiQueryStr<S>> for Cow<'_, RiQueryStr<T>>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec> PartialOrd<&RiQueryStr<S>> for Cow<'_, str>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec, T: Spec> PartialOrd<&RiQueryStr<S>> for RiQueryStr<T>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec, T: Spec> PartialOrd<&RiQueryStr<S>> for RiQueryString<T>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec> PartialOrd<&RiQueryStr<S>> for str

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec> PartialOrd<&str> for RiQueryStr<S>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec, T: Spec> PartialOrd<Cow<'_, RiQueryStr<T>>> for &RiQueryStr<S>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec> PartialOrd<Cow<'_, str>> for &RiQueryStr<S>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec> PartialOrd<Cow<'_, str>> for RiQueryStr<S>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec> PartialOrd<RiQueryStr<S>> for &str

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec> PartialOrd<RiQueryStr<S>> for Cow<'_, str>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec, T: Spec> PartialOrd<RiQueryStr<S>> for RiQueryString<T>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec> PartialOrd<RiQueryStr<S>> for str

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec, T: Spec> PartialOrd<RiQueryStr<T>> for &RiQueryStr<S>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec, T: Spec> PartialOrd<RiQueryString<T>> for &RiQueryStr<S>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec, T: Spec> PartialOrd<RiQueryString<T>> for RiQueryStr<S>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec> PartialOrd<str> for &RiQueryStr<S>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec> PartialOrd<str> for RiQueryStr<S>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S: Spec> PartialOrd for RiQueryStr<S>

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<S> Serialize for RiQueryStr<S>
where S: Spec,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<S: Spec> ToOwned for RiQueryStr<S>

§

type Owned = RiQueryString<S>

The resulting type after obtaining ownership.
source§

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

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<'a, S: Spec> TryFrom<&'a [u8]> for &'a RiQueryStr<S>

§

type Error = Error

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

fn try_from(bytes: &'a [u8]) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a, S: Spec> TryFrom<&'a str> for &'a RiQueryStr<S>

§

type Error = Error

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

fn try_from(s: &'a str) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<S: Spec> Eq for RiQueryStr<S>

Auto Trait Implementations§

§

impl<S> Freeze for RiQueryStr<S>

§

impl<S> RefUnwindSafe for RiQueryStr<S>

§

impl<S> Send for RiQueryStr<S>

§

impl<S> !Sized for RiQueryStr<S>

§

impl<S> Sync for RiQueryStr<S>

§

impl<S> Unpin for RiQueryStr<S>

§

impl<S> UnwindSafe for RiQueryStr<S>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more