pub struct LitExpr { /* fields omitted */ }
Create a new integer literal expression.
Create a new float literal expression.
Return the constant value of the literal.
Check if this is an integer literal.
Check if this is a floating-point literal.
Return the literal's integer value, or None
if it is not an integer.
Return the literal's float value, or None
if it is not an float.
Allocate a value of type T
.
The source file location of this node.
A human-readable description of the node's kind. Read more
Accept a visitor and call its corresponding visit_*
function.
Walk a visitor over the node's subtree.
A human-readable description of the node, including its name. Read more
Determine the type of the expression.
Determine the constant value of the expression. Read more
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)