pub struct Token {
pub typ: TokenType,
pub value: String,
pub children: TokenList,
pub normalized: String,
}
Expand description
parsed sql token
Fields§
§typ: TokenType
§value: String
§children: TokenList
§normalized: String
Implementations§
Source§impl Token
impl Token
pub fn new<T: AsRef<str> + ToString>(typ: TokenType, value: T) -> Self
pub fn new_parent(typ: TokenType, children: Vec<Token>) -> Self
pub fn new_value(children: &[Token]) -> String
pub fn update_value(&mut self)
pub fn is_whitespace(&self) -> bool
pub fn is_keyword(&self) -> bool
pub fn is_group(&self) -> bool
pub fn imt( token: Option<&Token>, types: &[TokenType], pattern: Option<&(TokenType, Vec<&str>)>, ) -> bool
pub fn get_name(&self) -> Option<&str>
pub fn get_real_name(&self) -> Option<&str>
pub fn get_parent_name(&self) -> Option<&str>
pub fn get_alias(&self) -> Option<&str>
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 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