pub struct LiteralExpr { /* private fields */ }Expand description
A LiteralExpr node (family.ungram rule LiteralExpr).
Implementations§
Source§impl LiteralExpr
impl LiteralExpr
pub fn int_number_token(&self) -> Option<SyntaxToken>
pub fn float_number_token(&self) -> Option<SyntaxToken>
pub fn string_lit_token(&self) -> Option<SyntaxToken>
pub fn true_token(&self) -> Option<SyntaxToken>
pub fn false_token(&self) -> Option<SyntaxToken>
pub fn duration_token(&self) -> Option<SyntaxToken>
Source§impl LiteralExpr
impl LiteralExpr
Sourcepub fn token(&self) -> Option<SyntaxToken>
pub fn token(&self) -> Option<SyntaxToken>
The literal or duration value token.
Trait Implementations§
Source§impl AstNode for LiteralExpr
impl AstNode for LiteralExpr
Source§fn cast(syntax: SyntaxNode) -> Option<Self>
fn cast(syntax: SyntaxNode) -> Option<Self>
Wraps
syntax if its kind matches this type; None otherwise.Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
The underlying untyped node.
Source§impl Clone for LiteralExpr
impl Clone for LiteralExpr
Source§impl Debug for LiteralExpr
impl Debug for LiteralExpr
impl Eq for LiteralExpr
Source§impl Hash for LiteralExpr
impl Hash for LiteralExpr
Source§impl PartialEq for LiteralExpr
impl PartialEq for LiteralExpr
impl StructuralPartialEq for LiteralExpr
Auto Trait Implementations§
impl !RefUnwindSafe for LiteralExpr
impl !Send for LiteralExpr
impl !Sync for LiteralExpr
impl !UnwindSafe for LiteralExpr
impl Freeze for LiteralExpr
impl Unpin for LiteralExpr
impl UnsafeUnpin for LiteralExpr
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