Struct String32

Source
pub struct String32(/* private fields */);
Expand description

A string that is indexed by u32 instead of usize.

On 64-bit platforms, String32 only requires 16 bytes to store the pointer, length, and capacity. String by comparison requires 24 bytes, plus padding.

Implementations§

Source§

impl String32

Source

pub fn new() -> Self

Create an empty String32.

§Examples
let s = String32::new();
Source

pub fn with_capacity(cap: u32) -> Self

Create an empty String32 with enough capacity to hold cap bytes.

§Examples
let mut s = String32::with_capacity(1);
let cap = s.capacity();
s.push('\n');
assert_eq!(cap, s.capacity());
Source

pub fn capacity(&self) -> u32

Return the capacity of this String32 in bytes.

§Examples
let mut s = String32::new();
assert_eq!(0, s.capacity());
s.push('\n');
assert!(s.capacity() > 0);
Source

pub fn as_string<F, T>(&mut self, f: F) -> T
where F: FnOnce(&mut String) -> T,

A helper to call arbitrary String methods on a String32.

§Panics

Panics if the resulting string would require more than u32::MAX bytes.

§Examples
let mut s = String32::new();
s.as_string(|s| s.push_str("test"));
assert_eq!(s, "test");
Source

pub fn push(&mut self, ch: char)

Push a char to the end of this String32.

§Panics

Panics if the resulting string would require more than u32::MAX bytes.

§Examples
let mut s = String32::new();
s.push('\n');
assert_eq!(s, "\n");
Source

pub fn push_str<S>(&mut self, s: S)
where S: AsRef<str>,

Append a string slice to the end of this String32.

§Panics

Panics if the resulting string would require more than u32::MAX bytes.

§Examples
let mut s = String32::new();
s.push_str("test");
assert_eq!(s, "test");
Source

pub fn pop(&mut self) -> Option<char>

Pop a char from the end of this String32.

§Examples
let mut s = String32::try_from("\n").unwrap();
assert_eq!(s.pop(), Some('\n'));
assert_eq!(s.pop(), None);
Source

pub fn remove(&mut self, idx: u32) -> char

Return the char at a given byte index.

§Panics

Panics if idx is not a UTF-8 code point boundary.

§Examples
let mut s = String32::try_from("abbc").unwrap();
assert_eq!(s.remove(1), 'b');
assert_eq!(s, "abc");
Source

pub fn insert(&mut self, idx: u32, ch: char)

Insert a char at a given byte index.

§Panics

Panics if idx is not a UTF-8 code point boundary, or if the resulting string would require more than u32::MAX bytes.

§Examples
let mut s = String32::try_from("ac").unwrap();
s.insert(1, 'b');
assert_eq!(s, "abc");
Source

pub fn insert_str<S>(&mut self, idx: u32, s: S)
where S: AsRef<str>,

Insert a string slice at the given byte index.

§Panics

Panics if idx is not a UTF-8 code point boundary, or if the resulting string would require more than u32::MAX bytes.

§Examples
let mut s = String32::try_from("ad").unwrap();
s.insert_str(1, "bc");
assert_eq!(s, "abcd");
Source

pub fn reserve(&mut self, additional: u32)

Reserve space for additional bytes.

§Examples
let mut s = String32::try_from("abc").unwrap();
s.reserve(10);
println!("{}", s.capacity());
assert!(s.capacity() >= 13);
Source

pub fn reserve_exact(&mut self, additional: u32)

Reserve space for an exact number of bytes.

§Examples
let mut s = String32::with_capacity(5);
s.reserve_exact(10);
assert!(s.capacity() >= 10);
Source

pub fn shrink_to_fit(&mut self)

Shrink the capacity of this String32 to match its length.

§Examples
let mut s = String32::with_capacity(10);
s.shrink_to_fit();
assert_eq!(0, s.capacity());
Source

pub fn truncate(&mut self, new_len: u32)

Shortens this String32 to the specified length.

§Examples
let mut s = String32::try_from("abcde").unwrap();
s.truncate(3);
assert_eq!(s, "abc");
Source

pub fn clear(&mut self)

Truncates the String32 into an empty string.

§Examples
let mut s = String32::try_from("abc").unwrap();
s.clear();
assert!(s.is_empty());
Source

pub fn into_bytes(self) -> Vec<u8>

Converts a String32 into a vector of bytes.

§Examples
let s = String32::try_from("123").unwrap();
let v = s.into_bytes();
assert_eq!(v, b"123");
Source

pub fn into_boxed_str(self) -> Box<str>

Converts a String32 into a Box<str>.

§Examples
let s = String32::try_from("123").unwrap();
let b = s.into_boxed_str();
Source

pub fn split_off(&mut self, at: u32) -> Self

Splits the String32 into two at the given byte index.

§Panics

Panics if the index is out-of-bounds or is not a UTF-8 code point boundary.

§Examples
let mut s1 = String32::try_from("123abc").unwrap();
let s2 = s1.split_off(3);
assert_eq!("123", s1);
assert_eq!("abc", s2);
Source

pub unsafe fn from_raw_parts(buf: *mut u8, len: u32, cap: u32) -> Self

Create a new String32 from a raw pointer and corresponding length/capacity.

§Safety

See String::from_raw_parts.

Source

pub fn from_utf8(v: Vec<u8>) -> Result<Self, FromUtf8Error>

Decodes a UTF-8 encoded vector of bytes into a String32.

§Errors

Returns Err if the slice is not valid UTF-8.

§Panics

Panics if the provided Vec<u8> holds more than u32::MAX bytes.

Source

pub fn from_utf16(v: &[u16]) -> Result<Self, FromUtf16Error>

Decodes a UTF-16 encoded slice into a String32.

§Errors

Returns Err if the slice is not valid UTF-16.

§Panics

Panics if the resulting UTF-8 representation would require more than u32::MAX bytes.

Source

pub fn from_utf16_lossy(v: &[u16]) -> Self

Lossily decodes a UTF-16 encoded slice into a String32.

§Panics

Panics if the resulting UTF-8 representation would require more than u32::MAX bytes.

Methods from Deref<Target = Str32>§

Source

pub fn as_str(&self) -> &str

Convert a &Str32 to a &str slice.

§Examples
let s: &Str32 = "123".try_into().unwrap();
assert_eq!("123", s.as_str());
Source

pub fn as_mut_str(&mut self) -> &mut str

Convert a &mut Str32 to a &mut str slice.

Source

pub fn as_bytes(&self) -> &[u8]

Converts the Str32 to a byte slice.

§Examples
let s: &Str32 = "123".try_into().unwrap();
assert_eq!(b"123", s.as_bytes());
Source

pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8]

Converts the Str32 to a byte slice.

§Examples
let mut s = String32::try_from("123").unwrap();
let bytes = unsafe { s.as_bytes_mut() };
assert_eq!(b"123", bytes);
§Safety

See str::as_bytes_mut.

Source

pub fn bytes(&self) -> Bytes<'_>

Returns an iterator over the bytes of the string slice.

Source

pub fn as_ptr(&self) -> *const u8

Converts the Str32 to a raw pointer.

Source

pub fn as_mut_ptr(&mut self) -> *mut u8

Converts the Str32 to a mutable raw pointer.

The caller must ensure that the string slice is only modified in a way that ensures it is always valid UTF-8.

Source

pub fn len(&self) -> u32

Returns the length of the Str32 in bytes.

§Examples
let s: &Str32 = "test".try_into().unwrap();
assert_eq!(4, s.len());
Source

pub fn is_empty(&self) -> bool

Returns whether the Str32 is empty.

§Examples
let s: &Str32 = "".try_into().unwrap();
assert!(s.is_empty());
Source

pub fn chars(&self) -> Chars<'_>

Returns an iterator over the characters of the Str32.

Source

pub fn char_indices(&self) -> impl DoubleEndedIterator<Item = (u32, char)> + '_

Returns an iterator over the characters of the Str32, and their byte indices.

Source

pub fn lines(&self) -> impl DoubleEndedIterator<Item = &Self> + '_

Returns an iterator over the lines of a &Str32.

Source

pub fn split_ascii_whitespace( &self, ) -> impl DoubleEndedIterator<Item = &Self> + '_

Returns an iterator over the ASCII-whitespace-delimited words of a &Str32.

Source

pub fn split_at(&self, mid: u32) -> (&Self, &Self)

Splits a &Str32 in two at the given byte index.

§Panics

Panics if mid is not a UTF-8 code point boundary.

Source

pub fn split_at_mut(&mut self, mid: u32) -> (&mut Self, &mut Self)

Splits a &mut Str32 in two at the given byte index.

§Panics

Panics if mid is not a UTF-8 code point boundary.

Source

pub fn split_whitespace(&self) -> impl DoubleEndedIterator<Item = &Self> + '_

Returns an iterator over the whitespace-delimited words of a &Str32.

Source

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

Checks if two string slices are equal, ignoring ASCII case mismatches.

Source

pub fn escape_debug(&self) -> EscapeDebug<'_>

Return an iterator over the string slice’s chars, each escaped according to char::escape_debug.

Source

pub fn escape_default(&self) -> EscapeDefault<'_>

Return an iterator over the string slice’s chars, each escaped according to char::escape_default.

Source

pub fn escape_unicode(&self) -> EscapeUnicode<'_>

Return an iterator over the string slice’s chars, each escaped according to char::escape_unicode.

Source

pub fn is_char_boundary(&self, index: u32) -> bool

Returns whether the given index corresponds to a char boundary.

Source

pub fn make_ascii_lowercase(&mut self)

Converts all uppercase ASCII characters to lowercase.

§Examples
let mut s = String32::try_from("ABC").unwrap();
s.make_ascii_lowercase();
assert_eq!("abc", s);
Source

pub fn make_ascii_uppercase(&mut self)

Converts all lowercase ASCII characters to uppercase.

§Examples
let mut s = String32::try_from("abc").unwrap();
s.make_ascii_uppercase();
assert_eq!("ABC", s);
Source

pub fn parse<F: FromStr>(&self) -> Result<F, F::Err>

Parses a &Str32 slice into another type.

§Errors

Will return Err if this &Str32 slice cannot be parsed into the desired type.

Err: string32::TryFromStringError

Source

pub fn repeat(&self, n: u32) -> String32

Create a String32 formed by n repetitions of this string slice.

§Panics

Panics if the resulting String32 would require more than u32::MAX bytes.

Source

pub fn to_lowercase(&self) -> String32

Returns a lowercase equivalent of this &Str32 as a new String32.

§Examples
let s: &Str32 = "ΑΒΓΔ".try_into().unwrap();
assert_eq!("αβγδ", s.to_lowercase());
Source

pub fn to_uppercase(&self) -> String32

Returns an uppercase equivalent of this &Str32 as a new String32.

§Examples
let s: &Str32 = "αβγδ".try_into().unwrap();
assert_eq!("ΑΒΓΔ", s.to_uppercase());
Source

pub fn to_ascii_lowercase(&self) -> String32

Returns a new String32 with each ASCII uppercase character mapped to lowercase.

§Examples
let s: &Str32 = "TEST".try_into().unwrap();
assert_eq!("test", s.to_ascii_lowercase());
Source

pub fn to_ascii_uppercase(&self) -> String32

Returns a new String32 with each ASCII lowercase character mapped to uppercase.

§Examples
let s: &Str32 = "test".try_into().unwrap();
assert_eq!("TEST", s.to_ascii_uppercase());
Source

pub fn trim(&self) -> &Self

Returns a substring of this string with leading and trailing whitespace removed.

§Examples
let s: &Str32 = " test\t\n ".try_into().unwrap();
assert_eq!("test", s.trim());
Source

pub fn trim_start(&self) -> &Self

Returns a substring of this string with leading whitespace removed.

§Examples
let s: &Str32 = " test\t\n ".try_into().unwrap();
assert_eq!("test\t\n ", s.trim_start());
Source

pub fn trim_end(&self) -> &Self

Returns a substring of this string with trailing whitespace removed.

§Examples
let s: &Str32 = " test\t\n ".try_into().unwrap();
assert_eq!(" test", s.trim_end());

Trait Implementations§

Source§

impl Add<&Str32> for String32

Source§

type Output = String32

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Str32) -> Self

Performs the + operation. Read more
Source§

impl Add<&str> for String32

Source§

type Output = String32

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &str) -> Self

Performs the + operation. Read more
Source§

impl AddAssign<&Str32> for String32

Source§

fn add_assign(&mut self, rhs: &Str32)

Performs the += operation. Read more
Source§

impl AddAssign<&str> for String32

Source§

fn add_assign(&mut self, rhs: &str)

Performs the += operation. Read more
Source§

impl AsMut<Str32> for String32

Source§

fn as_mut(&mut self) -> &mut Str32

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<[u8]> for String32

Source§

fn as_ref(&self) -> &[u8]

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

impl AsRef<Str32> for String32

Source§

fn as_ref(&self) -> &Str32

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

impl AsRef<str> for String32

Source§

fn as_ref(&self) -> &str

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

impl Borrow<Str32> for String32

Source§

fn borrow(&self) -> &Str32

Immutably borrows from an owned value. Read more
Source§

impl BorrowMut<Str32> for String32

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl Clone for String32

Source§

fn clone(&self) -> String32

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for String32

Source§

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

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

impl Default for String32

Source§

fn default() -> String32

Returns the “default value” for a type. Read more
Source§

impl Deref for String32

Source§

type Target = Str32

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Str32

Dereferences the value.
Source§

impl DerefMut for String32

Source§

fn deref_mut(&mut self) -> &mut Str32

Mutably dereferences the value.
Source§

impl Display for String32

Source§

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

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

impl From<&Str32> for String32

Source§

fn from(s: &Str32) -> Self

Converts to this type from the input type.
Source§

impl From<Box<Str32>> for String32

Source§

fn from(b: Box<Str32>) -> Self

Converts to this type from the input type.
Source§

impl From<String32> for String

Source§

fn from(s: String32) -> Self

Converts to this type from the input type.
Source§

impl From<String32> for Vec<u8>

Source§

fn from(s: String32) -> Self

Converts to this type from the input type.
Source§

impl<'a> FromIterator<&'a Str32> for String32

Source§

fn from_iter<I: IntoIterator<Item = &'a Str32>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl<'a> FromIterator<&'a char> for String32

Source§

fn from_iter<I: IntoIterator<Item = &'a char>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl<'a> FromIterator<&'a str> for String32

Source§

fn from_iter<I: IntoIterator<Item = &'a str>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl FromIterator<Box<Str32>> for String32

Source§

fn from_iter<I: IntoIterator<Item = Box<Str32>>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl FromIterator<Box<str>> for String32

Source§

fn from_iter<I: IntoIterator<Item = Box<str>>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl FromIterator<String> for String32

Source§

fn from_iter<I: IntoIterator<Item = String>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl FromIterator<String32> for String32

Source§

fn from_iter<I: IntoIterator<Item = Self>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl FromIterator<char> for String32

Source§

fn from_iter<I: IntoIterator<Item = char>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl Hash for String32

Source§

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

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for String32

Source§

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

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<'a, 'b> PartialEq<&'a Str32> for String32

Source§

fn eq(&self, rhs: &&'a Str32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<&'a str> for String32

Source§

fn eq(&self, rhs: &&'a str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<Box<Str32>> for String32

Source§

fn eq(&self, rhs: &Box<Str32>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<Box<str>> for String32

Source§

fn eq(&self, rhs: &Box<str>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<Cow<'a, Str32>> for String32

Source§

fn eq(&self, rhs: &Cow<'a, Str32>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<Cow<'a, str>> for String32

Source§

fn eq(&self, rhs: &Cow<'a, str>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<Str32> for String32

Source§

fn eq(&self, rhs: &Str32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<String> for String32

Source§

fn eq(&self, rhs: &String) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<String32> for &'a Str32

Source§

fn eq(&self, rhs: &String32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<String32> for &'a str

Source§

fn eq(&self, rhs: &String32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<String32> for Box<Str32>

Source§

fn eq(&self, rhs: &String32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<String32> for Box<str>

Source§

fn eq(&self, rhs: &String32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<String32> for Cow<'a, Str32>

Source§

fn eq(&self, rhs: &String32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<String32> for Cow<'a, str>

Source§

fn eq(&self, rhs: &String32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<String32> for Str32

Source§

fn eq(&self, rhs: &String32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<String32> for String

Source§

fn eq(&self, rhs: &String32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<String32> for str

Source§

fn eq(&self, rhs: &String32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialEq<str> for String32

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for String32

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b> PartialOrd<&'a Str32> for String32

Source§

fn partial_cmp(&self, rhs: &&'a Str32) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<&'a str> for String32

Source§

fn partial_cmp(&self, rhs: &&'a 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<Box<Str32>> for String32

Source§

fn partial_cmp(&self, rhs: &Box<Str32>) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<Box<str>> for String32

Source§

fn partial_cmp(&self, rhs: &Box<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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<Cow<'a, Str32>> for String32

Source§

fn partial_cmp(&self, rhs: &Cow<'a, Str32>) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<Cow<'a, str>> for String32

Source§

fn partial_cmp(&self, rhs: &Cow<'a, 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<Str32> for String32

Source§

fn partial_cmp(&self, rhs: &Str32) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<String> for String32

Source§

fn partial_cmp(&self, rhs: &String) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<String32> for &'a Str32

Source§

fn partial_cmp(&self, rhs: &String32) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<String32> for &'a str

Source§

fn partial_cmp(&self, rhs: &String32) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<String32> for Box<Str32>

Source§

fn partial_cmp(&self, rhs: &String32) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<String32> for Box<str>

Source§

fn partial_cmp(&self, rhs: &String32) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<String32> for Cow<'a, Str32>

Source§

fn partial_cmp(&self, rhs: &String32) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<String32> for Cow<'a, str>

Source§

fn partial_cmp(&self, rhs: &String32) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<String32> for Str32

Source§

fn partial_cmp(&self, rhs: &String32) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<String32> for String

Source§

fn partial_cmp(&self, rhs: &String32) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<String32> for str

Source§

fn partial_cmp(&self, rhs: &String32) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> PartialOrd<str> for String32

Source§

fn partial_cmp(&self, rhs: &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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd for String32

Source§

fn partial_cmp(&self, rhs: &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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<&str> for String32

Source§

type Error = TryFromStrError

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

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

Performs the conversion.
Source§

impl TryFrom<Box<str>> for String32

Source§

type Error = TryFromStringError<Box<str>>

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

fn try_from(s: Box<str>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<String> for String32

Source§

type Error = TryFromStringError<String>

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

fn try_from(s: String) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Eq for String32

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

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

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

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.