pub enum BindingPatternTypeArray {
Empty,
Elision,
SingleName {
ident: Box<str>,
default_init: Option<Node>,
},
BindingPattern {
pattern: DeclarationPattern,
},
SingleNameRest {
ident: Box<str>,
},
BindingPatternRest {
pattern: DeclarationPattern,
},
}Expand description
BindingPatternTypeArray represents the different types of bindings that an array binding pattern may contain.
More information:
Variants§
Empty
Empty represents an empty array binding pattern e.g. [ ].
This may occur because the Elision and BindingRestElement in the first type of
array binding pattern are both optional.
More information:
Elision
Elision represents the elision of an item in the array binding pattern.
An Elision may occur at multiple points in the pattern and may be multiple elisions.
This variant strictly represents one elision. If there are multiple, this should be used multiple times.
More information:
SingleName
SingleName represents a SingleNameBinding with an identifier and an optional default initializer.
More information:
BindingPattern
BindingPattern represents a BindingPattern in a BindingElement of an array binding pattern.
The pattern and the optional default initializer are both stored in the DeclarationPattern.
More information:
Fields
pattern: DeclarationPatternSingleNameRest
SingleNameRest represents a BindingIdentifier in a BindingRestElement of an array binding pattern.
More information:
BindingPatternRest
SingleNameRest represents a BindingPattern in a BindingRestElement of an array binding pattern.
More information:
Fields
pattern: DeclarationPatternTrait Implementations§
Source§impl Clone for BindingPatternTypeArray
impl Clone for BindingPatternTypeArray
Source§fn clone(&self) -> BindingPatternTypeArray
fn clone(&self) -> BindingPatternTypeArray
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more