Struct string32::String32[][src]

#[repr(transparent)]
pub struct String32(_);
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

impl String32[src]

#[must_use]
pub fn new() -> Self
[src]

Create an empty String32.

Examples

let s = String32::new();

#[must_use]
pub fn with_capacity(cap: u32) -> Self
[src]

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());

#[must_use]
pub fn capacity(&self) -> u32
[src]

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);

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

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");

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

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");

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

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");

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

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);

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

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");

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

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");

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

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");

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

Reserve space for additional bytes.

Examples

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

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

Reserve space for an exact number of bytes.

Examples

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

pub fn shrink_to_fit(&mut self)[src]

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());

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

Shortens this String32 to the specified length.

Examples

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

pub fn clear(&mut self)[src]

Truncates the String32 into an empty string.

Examples

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

#[must_use]
pub fn into_bytes(self) -> Vec<u8>
[src]

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");

#[must_use]
pub fn into_boxed_str(self) -> Box<str>
[src]

Converts a String32 into a Box<str>.

Examples

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

#[must_use = "if you plan to discard the second half, consider using `String32::truncate` instead"]
pub fn split_off(&mut self, at: u32) -> Self
[src]

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);

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

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

Safety

See String::from_raw_parts.

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

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.

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

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.

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

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>

#[must_use]
pub const fn as_str(&self) -> &str
[src]

Convert a &Str32 to a &str slice.

Examples

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

#[must_use]
pub fn as_mut_str(&mut self) -> &mut str
[src]

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

#[must_use]
pub const fn as_bytes(&self) -> &[u8]
[src]

Converts the Str32 to a byte slice.

Examples

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

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

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.

#[must_use]
pub fn bytes(&self) -> Bytes<'_>
[src]

Returns an iterator over the bytes of the string slice.

#[must_use]
pub const fn as_ptr(&self) -> *const u8
[src]

Converts the Str32 to a raw pointer.

#[must_use]
pub fn as_mut_ptr(&mut self) -> *mut u8
[src]

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.

#[must_use]
pub fn len(&self) -> u32
[src]

Returns the length of the Str32 in bytes.

Examples

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

#[must_use]
pub fn is_empty(&self) -> bool
[src]

Returns whether the Str32 is empty.

Examples

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

#[must_use]
pub fn chars(&self) -> Chars<'_>
[src]

Returns an iterator over the characters of the Str32.

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

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

#[must_use]
pub fn lines(&self) -> impl DoubleEndedIterator<Item = &Self> + '_
[src]

Returns an iterator over the lines of a &Str32.

#[must_use]
pub fn split_ascii_whitespace(
    &self
) -> impl DoubleEndedIterator<Item = &Self> + '_
[src]

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

#[must_use]
pub fn split_at(&self, mid: u32) -> (&Self, &Self)
[src]

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

Panics

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

#[must_use]
pub fn split_at_mut(&mut self, mid: u32) -> (&mut Self, &mut Self)
[src]

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

Panics

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

#[must_use]
pub fn split_whitespace(&self) -> impl DoubleEndedIterator<Item = &Self> + '_
[src]

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

#[must_use]
pub fn eq_ignore_ascii_case(&self, other: &Self) -> bool
[src]

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

#[must_use]
pub fn escape_debug(&self) -> EscapeDebug<'_>
[src]

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

#[must_use]
pub fn escape_default(&self) -> EscapeDefault<'_>
[src]

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

#[must_use]
pub fn escape_unicode(&self) -> EscapeUnicode<'_>
[src]

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

#[must_use]
pub fn is_char_boundary(&self, index: u32) -> bool
[src]

Returns whether the given index corresponds to a char boundary.

pub fn make_ascii_lowercase(&mut self)[src]

Converts all uppercase ASCII characters to lowercase.

Examples

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

pub fn make_ascii_uppercase(&mut self)[src]

Converts all lowercase ASCII characters to uppercase.

Examples

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

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

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

#[must_use]
pub fn repeat(&self, n: u32) -> String32
[src]

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

Panics

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

#[must_use]
pub fn to_lowercase(&self) -> String32
[src]

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

Examples

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

#[must_use]
pub fn to_uppercase(&self) -> String32
[src]

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

Examples

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

#[must_use]
pub fn to_ascii_lowercase(&self) -> String32
[src]

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());

#[must_use]
pub fn to_ascii_uppercase(&self) -> String32
[src]

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());

#[must_use]
pub fn trim(&self) -> &Self
[src]

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());

#[must_use]
pub fn trim_start(&self) -> &Self
[src]

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());

#[must_use]
pub fn trim_end(&self) -> &Self
[src]

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

impl Add<&'_ Str32> for String32[src]

type Output = Self

The resulting type after applying the + operator.

#[must_use]
fn add(self, rhs: &Str32) -> Self
[src]

Performs the + operation. Read more

impl Add<&'_ str> for String32[src]

type Output = Self

The resulting type after applying the + operator.

#[must_use]
fn add(self, rhs: &str) -> Self
[src]

Performs the + operation. Read more

impl AddAssign<&'_ Str32> for String32[src]

fn add_assign(&mut self, rhs: &Str32)[src]

Performs the += operation. Read more

impl AddAssign<&'_ str> for String32[src]

fn add_assign(&mut self, rhs: &str)[src]

Performs the += operation. Read more

impl AsMut<Str32> for String32[src]

fn as_mut(&mut self) -> &mut Str32[src]

Performs the conversion.

impl AsRef<[u8]> for String32[src]

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

Performs the conversion.

impl AsRef<Str32> for String32[src]

fn as_ref(&self) -> &Str32[src]

Performs the conversion.

impl AsRef<str> for String32[src]

fn as_ref(&self) -> &str[src]

Performs the conversion.

impl Borrow<Str32> for String32[src]

fn borrow(&self) -> &Str32[src]

Immutably borrows from an owned value. Read more

impl BorrowMut<Str32> for String32[src]

fn borrow_mut(&mut self) -> &mut Str32[src]

Mutably borrows from an owned value. Read more

impl Clone for String32[src]

fn clone(&self) -> String32[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for String32[src]

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

Formats the value using the given formatter. Read more

impl Default for String32[src]

fn default() -> String32[src]

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

impl Deref for String32[src]

type Target = Str32

The resulting type after dereferencing.

fn deref(&self) -> &Str32[src]

Dereferences the value.

impl DerefMut for String32[src]

fn deref_mut(&mut self) -> &mut Str32[src]

Mutably dereferences the value.

impl Display for String32[src]

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

Formats the value using the given formatter. Read more

impl From<&'_ Str32> for String32[src]

fn from(s: &Str32) -> Self[src]

Performs the conversion.

impl From<Box<Str32, Global>> for String32[src]

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

Performs the conversion.

impl<'a> FromIterator<&'a Str32> for String32[src]

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

Creates a value from an iterator. Read more

impl<'a> FromIterator<&'a char> for String32[src]

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

Creates a value from an iterator. Read more

impl<'a> FromIterator<&'a str> for String32[src]

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

Creates a value from an iterator. Read more

impl FromIterator<Box<Str32, Global>> for String32[src]

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

Creates a value from an iterator. Read more

impl FromIterator<Box<str, Global>> for String32[src]

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

Creates a value from an iterator. Read more

impl FromIterator<String> for String32[src]

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

Creates a value from an iterator. Read more

impl FromIterator<String32> for String32[src]

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

Creates a value from an iterator. Read more

impl FromIterator<char> for String32[src]

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

Creates a value from an iterator. Read more

impl Hash for String32[src]

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

Feeds this value into the given Hasher. Read more

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

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

impl Ord for String32[src]

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

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

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

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

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<Box<Str32, Global>> for String32[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<Box<str, Global>> for String32[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<Str32> for String32[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<String> for String32[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<String32> for String32[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<String32> for Str32[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, 'b> PartialEq<str> for String32[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

fn partial_cmp(&self, rhs: &&'a Str32) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

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

fn partial_cmp(&self, rhs: &&'a str) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

impl<'a, 'b> PartialOrd<Box<Str32, Global>> for String32[src]

fn partial_cmp(&self, rhs: &Box<Str32>) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

impl<'a, 'b> PartialOrd<Box<str, Global>> for String32[src]

fn partial_cmp(&self, rhs: &Box<str>) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

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

fn partial_cmp(&self, rhs: &Cow<'a, Str32>) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

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

fn partial_cmp(&self, rhs: &Cow<'a, str>) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

impl<'a, 'b> PartialOrd<Str32> for String32[src]

fn partial_cmp(&self, rhs: &Str32) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

impl<'a, 'b> PartialOrd<String> for String32[src]

fn partial_cmp(&self, rhs: &String) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

impl PartialOrd<String32> for String32[src]

fn partial_cmp(&self, rhs: &Self) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

impl<'a, 'b> PartialOrd<String32> for Str32[src]

fn partial_cmp(&self, rhs: &String32) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

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

fn partial_cmp(&self, rhs: &String32) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

impl<'a, 'b> PartialOrd<str> for String32[src]

fn partial_cmp(&self, rhs: &str) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

impl TryFrom<&'_ str> for String32[src]

type Error = TryFromStrError

The type returned in the event of a conversion error.

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

Performs the conversion.

impl TryFrom<Box<str, Global>> for String32[src]

type Error = TryFromStringError<Box<str>>

The type returned in the event of a conversion error.

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

Performs the conversion.

impl TryFrom<String> for String32[src]

type Error = TryFromStringError<String>

The type returned in the event of a conversion error.

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

Performs the conversion.

impl Eq for String32[src]

impl StructuralEq for String32[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.