Struct valkyrie_ast::VariableDeclaration
source · pub struct VariableDeclaration {
pub identifier: IdentifierNode,
pub type_hint: Option<ExpressionKind>,
pub body: Option<ExpressionKind>,
}Expand description
let mut pattern = expression
let x;
let x: i32;
let x = 1;
let x: i32 = 1;
let mut x: i32 = 1;
let (x, ) = 1
let Some(x) = expr;
Fields§
§identifier: IdentifierNodeThe annotation of the variable
type_hint: Option<ExpressionKind>The type of the variable
body: Option<ExpressionKind>The default value of the variable
Trait Implementations§
source§impl Clone for VariableDeclaration
impl Clone for VariableDeclaration
source§fn clone(&self) -> VariableDeclaration
fn clone(&self) -> VariableDeclaration
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for VariableDeclaration
impl Debug for VariableDeclaration
source§impl Hash for VariableDeclaration
impl Hash for VariableDeclaration
source§impl PartialEq for VariableDeclaration
impl PartialEq for VariableDeclaration
source§fn eq(&self, other: &VariableDeclaration) -> bool
fn eq(&self, other: &VariableDeclaration) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for VariableDeclaration
impl StructuralPartialEq for VariableDeclaration
Auto Trait Implementations§
impl RefUnwindSafe for VariableDeclaration
impl Send for VariableDeclaration
impl Sync for VariableDeclaration
impl Unpin for VariableDeclaration
impl UnwindSafe for VariableDeclaration
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