pub struct LitExpr { /* private fields */ }
Expand description

A literal expression.

Implementations

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.

Trait Implementations

Allocate a value of type T.

Formats the value using the given formatter. Read more

Determine the type of the expression.

Determine the constant value of the expression. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.