widestring::ustring

Type Alias WideString

Source
pub type WideString = U32String;
Expand description

Alias for U16String or U32String depending on platform. Intended to match typical C wchar_t size on platform.

Aliased Type§

struct WideString { /* private fields */ }

Implementations

Source§

impl U32String

Source

pub const fn new() -> Self

Constructs a new empty wide string.

Source

pub fn from_vec(raw: impl Into<Vec<u32>>) -> Self

Constructs a wide string from a vector.

No checks are made on the contents of the vector. It may or may not be valid character data.

§Examples
use widestring::U16String;
let v = vec![84u16, 104u16, 101u16]; // 'T' 'h' 'e'
// Create a wide string from the vector
let wstr = U16String::from_vec(v);
use widestring::U32String;
let v = vec![84u32, 104u32, 101u32]; // 'T' 'h' 'e'
// Create a wide string from the vector
let wstr = U32String::from_vec(v);
Source

pub unsafe fn from_ptr(p: *const u32, len: usize) -> Self

Constructs a wide string copy from a pointer and a length.

The len argument is the number of elements, not the number of bytes.

§Safety

This function is unsafe as there is no guarantee that the given pointer is valid for len elements.

In addition, the data must meet the safety conditions of std::slice::from_raw_parts.

§Panics

Panics if len is greater than 0 but p is a null pointer.

Source

pub fn with_capacity(capacity: usize) -> Self

Constructs a wide string with the given capacity.

The string will be able to hold exactly capacity elements without reallocating. If capacity is set to 0, the string will not initially allocate.

Source

pub fn capacity(&self) -> usize

Returns the capacity this wide string can hold without reallocating.

Source

pub fn clear(&mut self)

Truncates the wide string to zero length.

Source

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

Reserves the capacity for at least additional more capacity to be inserted in the given wide string.

More space may be reserved to avoid frequent allocations.

Source

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

Reserves the minimum capacity for exactly additional more capacity to be inserted in the given wide string. Does nothing if the capacity is already sufficient.

Note that the allocator may give more space than is requested. Therefore capacity can not be relied upon to be precisely minimal. Prefer reserve if future insertions are expected.

Source

pub fn into_vec(self) -> Vec<u32>

Converts the string into a Vec, consuming the string in the process.

Source

pub fn as_ustr(&self) -> &U32Str

Converts to a wide string slice.

Source

pub fn as_mut_ustr(&mut self) -> &mut U32Str

Converts to a mutable wide string slice.

Source

pub fn as_vec(&self) -> &Vec<u32>

Returns a Vec reference to the contents of this string.

Source

pub fn as_mut_vec(&mut self) -> &mut Vec<u32>

Returns a mutable reference to the contents of this string.

Source

pub fn push(&mut self, s: impl AsRef<U32Str>)

Extends the string with the given string slice.

No checks are performed on the strings. It is possible to end up nul values inside the string, or invalid encoding, and it is up to the caller to determine if that is acceptable.

§Examples
use widestring::U32String;
let s = "MyString";
let mut wstr = U32String::from_str(s);
let cloned = wstr.clone();
// Push the clone to the end, repeating the string twice.
wstr.push(cloned);

assert_eq!(wstr.to_string().unwrap(), "MyStringMyString");
Source

pub fn push_slice(&mut self, s: impl AsRef<[u32]>)

Extends the string with the given slice.

No checks are performed on the strings. It is possible to end up nul values inside the string, or invalid encoding, and it is up to the caller to determine if that is acceptable.

§Examples
use widestring::U32String;
let s = "MyString";
let mut wstr = U32String::from_str(s);
let cloned = wstr.clone();
// Push the clone to the end, repeating the string twice.
wstr.push_slice(cloned);

assert_eq!(wstr.to_string().unwrap(), "MyStringMyString");
Source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the wide string to match its length.

Source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of this string with a lower bound.

The capacity will remain at least as large as both the length and the supplied value.

If the current capacity is less than the lower limit, this is a no-op.

Source

pub fn into_boxed_ustr(self) -> Box<U32Str>

Converts this wide string into a boxed string slice.

§Examples
use widestring::{U32String, U32Str};

let s = U32String::from_str("hello");

let b: Box<U32Str> = s.into_boxed_ustr();
Source

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

Shortens this string to the specified length.

If new_len is greater than the string’s current length, this has no effect.

Note that this method has no effect on the allocated capacity of the string.

Source

pub fn insert_ustr(&mut self, idx: usize, string: &U32Str)

Inserts a string slice into this string at a specified position.

This is an O(n) operation as it requires copying every element in the buffer.

§Panics

Panics if idx is larger than the string’s length.

Source

pub fn split_off(&mut self, at: usize) -> U32String

Splits the string into two at the given index.

Returns a newly allocated string. self contains values [0, at), and the returned string contains values [at, len).

Note that the capacity of self does not change.

§Panics

Panics if at is equal to or greater than the length of the string.

Source

pub fn retain<F>(&mut self, f: F)
where F: FnMut(u32) -> bool,

Retains only the elements specified by the predicate.

In other words, remove all elements e such that f(e) returns false. This method operates in place, visiting each element exactly once in the original order, and preserves the order of the retained elements.

Source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, u32>
where R: RangeBounds<usize>,

Creates a draining iterator that removes the specified range in the string and yields the removed elements.

Note: The element range is removed even if the iterator is not consumed until the end.

§Panics

Panics if the starting point or end point are out of bounds.

Source

pub fn replace_range<R>(&mut self, range: R, replace_with: impl AsRef<U32Str>)
where R: RangeBounds<usize>,

Removes the specified range in the string, and replaces it with the given string.

The given string doesn’t need to be the same length as the range.

§Panics

Panics if the starting point or end point are out of bounds.

Source§

impl U32String

Source

pub fn from_chars(raw: impl Into<Vec<char>>) -> Self

Constructs a U32String from a char vector.

No checks are made on the contents of the vector.

§Examples
use widestring::U32String;
let v: Vec<char> = "Test".chars().collect();
// Create a wide string from the vector
let wstr = U32String::from_chars(v);
Source

pub fn from_str<S: AsRef<str> + ?Sized>(s: &S) -> Self

Constructs a U16String copy from a str, encoding it as UTF-32.

This makes a string copy of the str. Since str will always be valid UTF-8, the resulting U32String will also be valid UTF-32.

§Examples
use widestring::U32String;
let s = "MyString";
// Create a wide string from the string
let wstr = U32String::from_str(s);

assert_eq!(wstr.to_string().unwrap(), s);
Source

pub fn from_os_str<S: AsRef<OsStr> + ?Sized>(s: &S) -> Self

Constructs a U32String copy from an OsStr.

This makes a string copy of the OsStr. Since OsStr makes no guarantees that it is valid data, there is no guarantee that the resulting U32String will be valid UTF-32.

Note that the encoding of OsStr is platform-dependent, so on some platforms this may make an encoding conversions, while on other platforms no changes to the string will be made.

§Examples
use widestring::U32String;
let s = "MyString";
// Create a wide string from the string
let wstr = U32String::from_os_str(s);

assert_eq!(wstr.to_string().unwrap(), s);
Source

pub unsafe fn from_char_ptr(p: *const char, len: usize) -> Self

Constructs a U32String from a char pointer and a length.

The len argument is the number of char elements, not the number of bytes.

§Safety

This function is unsafe as there is no guarantee that the given pointer is valid for len elements.

In addition, the data must meet the safety conditions of std::slice::from_raw_parts.

§Panics

Panics if len is greater than 0 but p is a null pointer.

Source

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

Extends the string with the given string slice, encoding it at UTF-32.

No checks are performed on the strings. It is possible to end up nul values inside the string, and it is up to the caller to determine if that is acceptable.

§Examples
use widestring::U32String;
let s = "MyString";
let mut wstr = U32String::from_str(s);
// Push the original to the end, repeating the string twice.
wstr.push_str(s);

assert_eq!(wstr.to_string().unwrap(), "MyStringMyString");
Source

pub fn push_os_str(&mut self, s: impl AsRef<OsStr>)

Extends the string with the given string slice.

No checks are performed on the strings. It is possible to end up nul values inside the string, and it is up to the caller to determine if that is acceptable.

§Examples
use widestring::U32String;
let s = "MyString";
let mut wstr = U32String::from_str(s);
// Push the original to the end, repeating the string twice.
wstr.push_os_str(s);

assert_eq!(wstr.to_string().unwrap(), "MyStringMyString");
Source

pub fn push_char(&mut self, c: char)

Appends the given char encoded as UTF-32 to the end of this string.

Source

pub fn pop_char(&mut self) -> Option<u32>

Removes the last value from the string buffer and returns it.

This method assumes UTF-32 encoding.

Returns None if this String is empty.

Source

pub fn remove_char(&mut self, idx: usize) -> u32

Removes a value from this string at a position and returns it.

This method assumes UTF-32 encoding.

This is an O(n) operation, as it requires copying every element in the buffer.

§Panics

Panics if idx is larger than or equal to the string’s length.

Source

pub fn insert_char(&mut self, idx: usize, c: char)

Inserts a character encoded as UTF-32 into this string at a specified position.

This is an O(n) operation as it requires copying every element in the buffer.

§Panics

Panics if idx is larger than the string’s length.

Trait Implementations

Source§

impl Add<&U32CStr> for U32String

Source§

type Output = U32String

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&U32Str> for U32String

Source§

type Output = U32String

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&Utf32Str> for U32String

Source§

type Output = U32String

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&str> for U32String

Source§

type Output = U32String

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign<&U32CStr> for U32String

Source§

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

Performs the += operation. Read more
Source§

impl AddAssign<&U32Str> for U32String

Source§

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

Performs the += operation. Read more
Source§

impl AddAssign<&Utf32Str> for U32String

Source§

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

Performs the += operation. Read more
Source§

impl AddAssign<&str> for U32String

Source§

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

Performs the += operation. Read more
Source§

impl AsMut<[u32]> for U32String

Source§

fn as_mut(&mut self) -> &mut [u32]

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

impl AsMut<U32Str> for U32String

Source§

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

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

impl AsRef<[u32]> for U32String

Source§

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

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

impl AsRef<U32Str> for U32String

Source§

fn as_ref(&self) -> &U32Str

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

impl Borrow<U32Str> for U32String

Source§

fn borrow(&self) -> &U32Str

Immutably borrows from an owned value. Read more
Source§

impl BorrowMut<U32Str> for U32String

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl Clone for U32String

Source§

fn clone(&self) -> U32String

Returns a copy 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 U32String

Source§

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

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

impl Default for U32String

Source§

fn default() -> U32String

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

impl Deref for U32String

Source§

type Target = U32Str

The resulting type after dereferencing.
Source§

fn deref(&self) -> &U32Str

Dereferences the value.
Source§

impl DerefMut for U32String

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<'a> Extend<&'a U32CStr> for U32String

Source§

fn extend<T: IntoIterator<Item = &'a U32CStr>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<'a> Extend<&'a U32Str> for U32String

Source§

fn extend<T: IntoIterator<Item = &'a U32Str>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<'a> Extend<&'a Utf32Str> for U32String

Source§

fn extend<T: IntoIterator<Item = &'a Utf32Str>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<'a> Extend<&'a char> for U32String

Source§

fn extend<T: IntoIterator<Item = &'a char>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<'a> Extend<&'a str> for U32String

Source§

fn extend<T: IntoIterator<Item = &'a str>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Extend<Box<U32Str>> for U32String

Source§

fn extend<T: IntoIterator<Item = Box<U32Str>>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<'a> Extend<Cow<'a, U32Str>> for U32String

Source§

fn extend<T: IntoIterator<Item = Cow<'a, U32Str>>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Extend<String> for U32String

Source§

fn extend<T: IntoIterator<Item = String>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Extend<U32CString> for U32String

Source§

fn extend<T: IntoIterator<Item = U32CString>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Extend<U32String> for U32String

Source§

fn extend<T: IntoIterator<Item = U32String>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Extend<Utf32String> for U32String

Source§

fn extend<T: IntoIterator<Item = Utf32String>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Extend<char> for U32String

Source§

fn extend<T: IntoIterator<Item = char>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl From<&[char]> for U32String

Source§

fn from(value: &[char]) -> Self

Converts to this type from the input type.
Source§

impl<'a, T: ?Sized + AsRef<U32Str>> From<&'a T> for U32String

Source§

fn from(s: &'a T) -> Self

Converts to this type from the input type.
Source§

impl From<&str> for U32String

Source§

fn from(s: &str) -> Self

Converts to this type from the input type.
Source§

impl From<Box<U32Str>> for U32String

Source§

fn from(boxed: Box<U32Str>) -> Self

Converts to this type from the input type.
Source§

impl From<OsString> for U32String

Source§

fn from(s: OsString) -> Self

Converts to this type from the input type.
Source§

impl From<String> for U32String

Source§

fn from(s: String) -> Self

Converts to this type from the input type.
Source§

impl From<U32CString> for U32String

Source§

fn from(s: U32CString) -> Self

Converts to this type from the input type.
Source§

impl From<Utf32String> for U32String

Source§

fn from(value: Utf32String) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<char>> for U32String

Source§

fn from(value: Vec<char>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u32>> for U32String

Source§

fn from(value: Vec<u32>) -> Self

Converts to this type from the input type.
Source§

impl<'a> FromIterator<&'a U32CStr> for U32String

Source§

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

Creates a value from an iterator. Read more
Source§

impl<'a> FromIterator<&'a U32Str> for U32String

Source§

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

Creates a value from an iterator. Read more
Source§

impl<'a> FromIterator<&'a Utf32Str> for U32String

Source§

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

Creates a value from an iterator. Read more
Source§

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

Source§

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

Creates a value from an iterator. Read more
Source§

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

Source§

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

Creates a value from an iterator. Read more
Source§

impl FromIterator<Box<U32Str>> for U32String

Source§

fn from_iter<T: IntoIterator<Item = Box<U32Str>>>(iter: T) -> Self

Creates a value from an iterator. Read more
Source§

impl<'a> FromIterator<Cow<'a, U32Str>> for U32String

Source§

fn from_iter<T: IntoIterator<Item = Cow<'a, U32Str>>>(iter: T) -> Self

Creates a value from an iterator. Read more
Source§

impl FromIterator<String> for U32String

Source§

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

Creates a value from an iterator. Read more
Source§

impl FromIterator<U32CString> for U32String

Source§

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

Creates a value from an iterator. Read more
Source§

impl FromIterator<U32String> for U32String

Source§

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

Creates a value from an iterator. Read more
Source§

impl FromIterator<Utf32String> for U32String

Source§

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

Creates a value from an iterator. Read more
Source§

impl FromIterator<char> for U32String

Source§

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

Creates a value from an iterator. Read more
Source§

impl FromStr for U32String

Source§

type Err = Infallible

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for U32String

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<I> Index<I> for U32String
where I: SliceIndex<[u32], Output = [u32]>,

Source§

type Output = U32Str

The returned type after indexing.
Source§

fn index(&self, index: I) -> &U32Str

Performs the indexing (container[index]) operation. Read more
Source§

impl<I> IndexMut<I> for U32String
where I: SliceIndex<[u32], Output = [u32]>,

Source§

fn index_mut(&mut self, index: I) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl Ord for U32String

Source§

fn cmp(&self, other: &U32String) -> 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> PartialEq<&'a U32CStr> for U32String

Source§

fn eq(&self, other: &&'a U32CStr) -> 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> PartialEq<&'a U32Str> for U32String

Source§

fn eq(&self, other: &&'a U32Str) -> 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> PartialEq<Cow<'a, U32CStr>> for U32String

Source§

fn eq(&self, other: &Cow<'a, U32CStr>) -> 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> PartialEq<Cow<'a, U32Str>> for U32String

Source§

fn eq(&self, other: &Cow<'a, U32Str>) -> 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<U32CStr> for U32String

Source§

fn eq(&self, other: &U32CStr) -> 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<U32CString> for U32String

Source§

fn eq(&self, other: &U32CString) -> 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<U32Str> for U32String

Source§

fn eq(&self, other: &U32Str) -> 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<Utf32Str> for U32String

Source§

fn eq(&self, other: &Utf32Str) -> 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<Utf32String> for U32String

Source§

fn eq(&self, other: &Utf32String) -> 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 U32String

Source§

fn eq(&self, other: &U32String) -> 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> PartialOrd<&'a U32CStr> for U32String

Source§

fn partial_cmp(&self, other: &&'a U32CStr) -> 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> PartialOrd<&'a U32Str> for U32String

Source§

fn partial_cmp(&self, other: &&'a U32Str) -> 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> PartialOrd<Cow<'a, U32CStr>> for U32String

Source§

fn partial_cmp(&self, other: &Cow<'a, U32CStr>) -> 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> PartialOrd<Cow<'a, U32Str>> for U32String

Source§

fn partial_cmp(&self, other: &Cow<'a, U32Str>) -> 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<U32CStr> for U32String

Source§

fn partial_cmp(&self, other: &U32CStr) -> 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<U32CString> for U32String

Source§

fn partial_cmp(&self, other: &U32CString) -> 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<U32Str> for U32String

Source§

fn partial_cmp(&self, other: &U32Str) -> 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 U32String

Source§

fn partial_cmp(&self, other: &U32String) -> 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 Write for U32String

Source§

fn write_str(&mut self, s: &str) -> Result

Writes a string slice into this writer, returning whether the write succeeded. Read more
Source§

fn write_char(&mut self, c: char) -> Result

Writes a char into this writer, returning whether the write succeeded. Read more
1.0.0 · Source§

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Glue for usage of the write! macro with implementors of this trait. Read more
Source§

impl Eq for U32String

Source§

impl StructuralPartialEq for U32String