[−][src]Struct rslint_lexer::Token
A single raw token such as >>
or ||
or "abc"
.
Fields
kind: SyntaxKind
The kind of token this is.
len: usize
How long the token is in bytes. For tokens with escape sequences
like strings with \uXXXX
escapes, the length is the raw length, not considering the char backed by the escape.
Implementations
impl Token
[src]
pub fn single(kind: SyntaxKind) -> Self
[src]
Create a new token which has an exact length of 1.
pub fn new(kind: SyntaxKind, len: usize) -> Self
[src]
Create a new token which has a specific length.
Trait Implementations
impl Clone for Token
[src]
impl Copy for Token
[src]
impl Debug for Token
[src]
impl Eq for Token
[src]
impl Hash for Token
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Token
[src]
fn cmp(&self, other: &Token) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Token> for Token
[src]
impl PartialOrd<Token> for Token
[src]
fn partial_cmp(&self, other: &Token) -> Option<Ordering>
[src]
fn lt(&self, other: &Token) -> bool
[src]
fn le(&self, other: &Token) -> bool
[src]
fn gt(&self, other: &Token) -> bool
[src]
fn ge(&self, other: &Token) -> bool
[src]
impl StructuralEq for Token
[src]
impl StructuralPartialEq for Token
[src]
Auto Trait Implementations
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erasable for T
unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>
const ACK_1_1_0: bool
fn erase(this: NonNull<Self>) -> NonNull<Erased>
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,