Enum nucleo_matcher::Utf32String
source · pub enum Utf32String {
Ascii(Box<str>),
Unicode(Box<[char]>),
}
Expand description
An owned version of Utf32Str
.
Variants§
Ascii(Box<str>)
A string represented as ASCII encoded bytes. Correctness invariant: must only contain valid ASCII (<=127)
Unicode(Box<[char]>)
A string represented as an array of unicode codepoints (basically UTF-32).
Implementations§
source§impl Utf32String
impl Utf32String
sourcepub fn slice(&self, range: impl RangeBounds<usize>) -> Utf32Str<'_>
pub fn slice(&self, range: impl RangeBounds<usize>) -> Utf32Str<'_>
Creates a slice with a string that contains the characters in the specified character range.
sourcepub fn slice_u32(&self, range: impl RangeBounds<u32>) -> Utf32Str<'_>
pub fn slice_u32(&self, range: impl RangeBounds<u32>) -> Utf32Str<'_>
Same as slice
but accepts a u32 range for convenience since
those are the indices returned by the matcher.
Trait Implementations§
source§impl Clone for Utf32String
impl Clone for Utf32String
source§fn clone(&self) -> Utf32String
fn clone(&self) -> Utf32String
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Utf32String
impl Debug for Utf32String
source§impl Default for Utf32String
impl Default for Utf32String
source§impl Display for Utf32String
impl Display for Utf32String
source§impl From<&str> for Utf32String
impl From<&str> for Utf32String
source§impl From<String> for Utf32String
impl From<String> for Utf32String
source§impl Hash for Utf32String
impl Hash for Utf32String
source§impl Ord for Utf32String
impl Ord for Utf32String
source§fn cmp(&self, other: &Utf32String) -> Ordering
fn cmp(&self, other: &Utf32String) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Utf32String
impl PartialEq for Utf32String
source§fn eq(&self, other: &Utf32String) -> bool
fn eq(&self, other: &Utf32String) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Utf32String
impl PartialOrd for Utf32String
source§fn partial_cmp(&self, other: &Utf32String) -> Option<Ordering>
fn partial_cmp(&self, other: &Utf32String) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Utf32String
impl StructuralPartialEq for Utf32String
Auto Trait Implementations§
impl RefUnwindSafe for Utf32String
impl Send for Utf32String
impl Sync for Utf32String
impl Unpin for Utf32String
impl UnwindSafe for Utf32String
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more