pub enum BindingPatternTypeObject {
Empty,
SingleName {
ident: Box<str>,
property_name: Box<str>,
default_init: Option<Node>,
},
RestProperty {
ident: Box<str>,
excluded_keys: Vec<Box<str>>,
},
BindingPattern {
ident: Box<str>,
pattern: DeclarationPattern,
default_init: Option<Node>,
},
}Expand description
BindingPatternTypeObject represents the different types of bindings that an object binding pattern may contain.
More information:
Variants§
Empty
Empty represents an empty object binding pattern e.g. { }.
SingleName
SingleName represents one of the following properties:
SingleNameBindingwith an identifier and an optional default initializer.BindingPropertywith an property name and aSingleNameBindingas theBindingElement.
More information:
RestProperty
RestProperty represents a BindingRestProperty with an identifier.
It also includes a list of the property keys that should be excluded from the rest, because they where already assigned.
More information:
BindingPattern
BindingPattern represents a BindingProperty with a BindingPattern as the BindingElement.
Additionally to the identifier of the new property and the nested binding pattern, this may also include an optional default initializer.
More information:
Trait Implementations§
Source§impl Clone for BindingPatternTypeObject
impl Clone for BindingPatternTypeObject
Source§fn clone(&self) -> BindingPatternTypeObject
fn clone(&self) -> BindingPatternTypeObject
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 BindingPatternTypeObject
impl Debug for BindingPatternTypeObject
Source§impl Display for BindingPatternTypeObject
impl Display for BindingPatternTypeObject
Source§impl Drop for BindingPatternTypeObject
impl Drop for BindingPatternTypeObject
Source§impl PartialEq for BindingPatternTypeObject
impl PartialEq for BindingPatternTypeObject
Source§impl Trace for BindingPatternTypeObject
impl Trace for BindingPatternTypeObject
Source§fn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects
impl StructuralPartialEq for BindingPatternTypeObject
Auto Trait Implementations§
impl Freeze for BindingPatternTypeObject
impl RefUnwindSafe for BindingPatternTypeObject
impl !Send for BindingPatternTypeObject
impl !Sync for BindingPatternTypeObject
impl Unpin for BindingPatternTypeObject
impl UnwindSafe for BindingPatternTypeObject
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