Struct yap::types::StrTokensLocation
source · pub struct StrTokensLocation(/* private fields */);
Expand description
This implements TokenLocation
and stores the location of
our current cursor into some string. The location is the byte index
into the string and not the nth character we’re up to (a character
may be represented by several bytes).
Trait Implementations§
source§impl Clone for StrTokensLocation
impl Clone for StrTokensLocation
source§fn clone(&self) -> StrTokensLocation
fn clone(&self) -> StrTokensLocation
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 StrTokensLocation
impl Debug for StrTokensLocation
source§impl Hash for StrTokensLocation
impl Hash for StrTokensLocation
source§impl Ord for StrTokensLocation
impl Ord for StrTokensLocation
source§fn cmp(&self, other: &StrTokensLocation) -> Ordering
fn cmp(&self, other: &StrTokensLocation) -> 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 StrTokensLocation
impl PartialEq for StrTokensLocation
source§fn eq(&self, other: &StrTokensLocation) -> bool
fn eq(&self, other: &StrTokensLocation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for StrTokensLocation
impl PartialOrd for StrTokensLocation
source§fn partial_cmp(&self, other: &StrTokensLocation) -> Option<Ordering>
fn partial_cmp(&self, other: &StrTokensLocation) -> 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 moresource§impl TokenLocation for StrTokensLocation
impl TokenLocation for StrTokensLocation
impl Copy for StrTokensLocation
impl Eq for StrTokensLocation
impl StructuralEq for StrTokensLocation
impl StructuralPartialEq for StrTokensLocation
Auto Trait Implementations§
impl RefUnwindSafe for StrTokensLocation
impl Send for StrTokensLocation
impl Sync for StrTokensLocation
impl Unpin for StrTokensLocation
impl UnwindSafe for StrTokensLocation
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