pub struct CommonToken { /* private fields */ }Implementations§
Source§impl CommonToken
impl CommonToken
pub const fn new(token_type: i32) -> Self
pub fn eof( source_name: impl Into<String>, index: usize, line: usize, column: usize, ) -> Self
pub fn with_text(self, text: impl Into<String>) -> Self
pub const fn with_span(self, start: usize, stop: usize) -> Self
pub const fn with_position(self, line: usize, column: usize) -> Self
pub const fn with_channel(self, channel: i32) -> Self
pub fn with_source_name(self, source_name: impl Into<String>) -> Self
pub const fn set_token_index(&mut self, token_index: isize)
Trait Implementations§
Source§impl Clone for CommonToken
impl Clone for CommonToken
Source§fn clone(&self) -> CommonToken
fn clone(&self) -> CommonToken
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 CommonToken
impl Debug for CommonToken
Source§impl Display for CommonToken
impl Display for CommonToken
Source§impl PartialEq for CommonToken
impl PartialEq for CommonToken
Source§fn eq(&self, other: &CommonToken) -> bool
fn eq(&self, other: &CommonToken) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Token for CommonToken
impl Token for CommonToken
fn token_type(&self) -> i32
fn channel(&self) -> i32
fn start(&self) -> usize
fn stop(&self) -> usize
fn token_index(&self) -> isize
fn line(&self) -> usize
fn column(&self) -> usize
fn text(&self) -> Option<&str>
fn source_name(&self) -> &str
fn interval(&self) -> TextInterval
impl Eq for CommonToken
impl StructuralPartialEq for CommonToken
Auto Trait Implementations§
impl Freeze for CommonToken
impl RefUnwindSafe for CommonToken
impl Send for CommonToken
impl Sync for CommonToken
impl Unpin for CommonToken
impl UnsafeUnpin for CommonToken
impl UnwindSafe for CommonToken
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