pub struct MatchRange {
pub chars: Range<usize>,
pub utf8: Range<usize>,
pub utf16: Range<usize>,
}Expand description
One span of the caller’s term string, in three units.
All three ranges are half-open and describe the same characters.
Fields§
§chars: Range<usize>Code points (str::chars positions; Python str indices).
utf8: Range<usize>UTF-8 bytes: always on char boundaries, so &source[r.utf8] works.
utf16: Range<usize>UTF-16 code units (JavaScript string indices); never splits a surrogate pair.
Trait Implementations§
Source§impl Clone for MatchRange
impl Clone for MatchRange
Source§fn clone(&self) -> MatchRange
fn clone(&self) -> MatchRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MatchRange
impl Debug for MatchRange
Source§impl Default for MatchRange
impl Default for MatchRange
Source§fn default() -> MatchRange
fn default() -> MatchRange
Returns the “default value” for a type. Read more
impl Eq for MatchRange
Source§impl Hash for MatchRange
impl Hash for MatchRange
Source§impl PartialEq for MatchRange
impl PartialEq for MatchRange
impl StructuralPartialEq for MatchRange
Auto Trait Implementations§
impl Freeze for MatchRange
impl RefUnwindSafe for MatchRange
impl Send for MatchRange
impl Sync for MatchRange
impl Unpin for MatchRange
impl UnsafeUnpin for MatchRange
impl UnwindSafe for MatchRange
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