#[non_exhaustive]pub struct VariableDecl {
pub declarator: String,
pub variables: Vec<VariableBinding>,
pub attribute_count: usize,
pub has_initializer: bool,
pub is_list: bool,
}Expand description
Variable declaration HIR payload.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.declarator: StringScope/storage declarator: my, our, state, or local.
variables: Vec<VariableBinding>Variables statically visible in the declaration.
attribute_count: usizeNumber of parsed attributes on the declaration.
has_initializer: boolWhether the declaration has an initializer expression.
is_list: boolWhether this came from a list declaration.
Trait Implementations§
Source§impl Clone for VariableDecl
impl Clone for VariableDecl
Source§fn clone(&self) -> VariableDecl
fn clone(&self) -> VariableDecl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 VariableDecl
impl Debug for VariableDecl
Source§impl PartialEq for VariableDecl
impl PartialEq for VariableDecl
Source§fn eq(&self, other: &VariableDecl) -> bool
fn eq(&self, other: &VariableDecl) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for VariableDecl
impl StructuralPartialEq for VariableDecl
Auto Trait Implementations§
impl Freeze for VariableDecl
impl RefUnwindSafe for VariableDecl
impl Send for VariableDecl
impl Sync for VariableDecl
impl Unpin for VariableDecl
impl UnsafeUnpin for VariableDecl
impl UnwindSafe for VariableDecl
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