pub struct VariableDecl {
pub kind: VarKind,
pub is_mut: bool,
pub pattern: DestructurePattern,
pub type_annotation: Option<TypeAnnotation>,
pub value: Option<Expr>,
pub ownership: OwnershipModifier,
}Fields§
§kind: VarKind§is_mut: boolExplicit mutability: let mut x = ...
When false with VarKind::Let, the binding is immutable.
When VarKind::Var, mutability is inferred from usage.
pattern: DestructurePattern§type_annotation: Option<TypeAnnotation>§value: Option<Expr>§ownership: OwnershipModifierExplicit ownership modifier on the initializer: let x = move y or let x = clone y
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 · 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<'de> Deserialize<'de> for VariableDecl
impl<'de> Deserialize<'de> for VariableDecl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for VariableDecl
impl PartialEq for VariableDecl
Source§impl Serialize for VariableDecl
impl Serialize 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