pub struct Token {
pub kind: TokenKind,
pub position: Position,
}Expand description
Represents a Thrift token in a document.
Fields§
§kind: TokenKind§position: PositionImplementations§
Source§impl Token
impl Token
Sourcepub fn is_invalid(&self) -> bool
pub fn is_invalid(&self) -> bool
Returns true if the token is an invalid token.
Sourcepub fn is_comment(&self) -> bool
pub fn is_comment(&self) -> bool
Returns true if the token is a comment.
Sourcepub fn is_line_separator(&self) -> bool
pub fn is_line_separator(&self) -> bool
Returns true if the token is a separator.
Trait Implementations§
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Token
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