pub enum ObjectDestructuringField<T: VariableFieldKind> {
Name(VariableIdentifier, T::OptionalExpression, Span),
Spread(VariableIdentifier, Span),
Map {
from: PropertyKey<AlwaysPublic>,
name: WithComment<VariableField<T>>,
default_value: T::OptionalExpression,
position: Span,
},
}
Variants§
Name(VariableIdentifier, T::OptionalExpression, Span)
{ x }
Spread(VariableIdentifier, Span)
{ ...x }
Map
Fields
§
from: PropertyKey<AlwaysPublic>
§
name: WithComment<VariableField<T>>
§
default_value: T::OptionalExpression
{ x: y }
Trait Implementations§
source§impl<U: VariableFieldKind> ASTNode for ObjectDestructuringField<U>
impl<U: VariableFieldKind> ASTNode for ObjectDestructuringField<U>
fn from_reader( reader: &mut impl TokenReader<TSXToken, TokenStart>, state: &mut ParsingState, options: &ParseOptions ) -> ParseResult<Self>
fn to_string_from_buffer<T: ToString>( &self, buf: &mut T, options: &ToStringOptions, depth: u8 )
source§fn get_position(&self) -> &Span
fn get_position(&self) -> &Span
Returns position of node as span AS IT WAS PARSED. May be Span::NULL if AST was doesn’t match anything in source
source§fn from_string(
script: String,
options: ParseOptions,
source: SourceId,
offset: Option<u32>
) -> ParseResult<Self>
fn from_string( script: String, options: ParseOptions, source: SourceId, offset: Option<u32> ) -> ParseResult<Self>
From string, with default impl to call abstract method from_reader
source§fn to_string(&self, options: &ToStringOptions) -> String
fn to_string(&self, options: &ToStringOptions) -> String
Returns structure as valid string
source§impl<T: Clone + VariableFieldKind> Clone for ObjectDestructuringField<T>where
T::OptionalExpression: Clone,
impl<T: Clone + VariableFieldKind> Clone for ObjectDestructuringField<T>where
T::OptionalExpression: Clone,
source§fn clone(&self) -> ObjectDestructuringField<T>
fn clone(&self) -> ObjectDestructuringField<T>
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<T: Debug + VariableFieldKind> Debug for ObjectDestructuringField<T>where
T::OptionalExpression: Debug,
impl<T: Debug + VariableFieldKind> Debug for ObjectDestructuringField<T>where
T::OptionalExpression: Debug,
source§impl<T: VariableFieldKind> GetFieldByType<BaseSpan<()>> for ObjectDestructuringField<T>
impl<T: VariableFieldKind> GetFieldByType<BaseSpan<()>> for ObjectDestructuringField<T>
source§impl<T: VariableFieldKind> PartialEq for ObjectDestructuringField<T>
impl<T: VariableFieldKind> PartialEq for ObjectDestructuringField<T>
source§impl<T: VariableFieldKind> SelfRustTokenize for ObjectDestructuringField<T>
impl<T: VariableFieldKind> SelfRustTokenize for ObjectDestructuringField<T>
fn append_to_token_stream(&self, token_stream: &mut TokenStream)
source§fn to_tokens(&self) -> TokenStream
fn to_tokens(&self) -> TokenStream
Returns the tokens used to construct self
source§impl<T> Serialize for ObjectDestructuringField<T>
impl<T> Serialize for ObjectDestructuringField<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for ObjectDestructuringField<T>
impl<T> Send for ObjectDestructuringField<T>
impl<T> Sync for ObjectDestructuringField<T>
impl<T> Unpin for ObjectDestructuringField<T>
impl<T> UnwindSafe for ObjectDestructuringField<T>
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