Enum ezno_parser::property_key::PropertyKey
source · pub enum PropertyKey<T: PropertyKeyKind> {
Ident(String, Span, T::Private),
StringLiteral(String, Span),
NumberLiteral(NumberStructure, Span),
Computed(Box<Expression>, Span),
}Expand description
A key for a member in a class or object literal
Variants§
Ident(String, Span, T::Private)
StringLiteral(String, Span)
NumberLiteral(NumberStructure, Span)
Computed(Box<Expression>, Span)
Includes anything in the [...] maybe a symbol
Implementations§
source§impl<U: PropertyKeyKind> PropertyKey<U>
impl<U: PropertyKeyKind> PropertyKey<U>
pub fn get_position(&self) -> &Span
Trait Implementations§
source§impl<U: PropertyKeyKind + 'static> ASTNode for PropertyKey<U>
impl<U: PropertyKeyKind + 'static> ASTNode for PropertyKey<U>
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
fn from_reader( reader: &mut impl TokenReader<TSXToken, TokenStart>, state: &mut ParsingState, settings: &ParseOptions ) -> ParseResult<Self>
fn to_string_from_buffer<T: ToString>( &self, buf: &mut T, settings: &ToStringOptions, depth: u8 )
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, settings: &ToStringOptions) -> String
fn to_string(&self, settings: &ToStringOptions) -> String
Returns structure as valid string
source§impl<T: Clone + PropertyKeyKind> Clone for PropertyKey<T>where
T::Private: Clone,
impl<T: Clone + PropertyKeyKind> Clone for PropertyKey<T>where T::Private: Clone,
source§fn clone(&self) -> PropertyKey<T>
fn clone(&self) -> PropertyKey<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 + PropertyKeyKind> Debug for PropertyKey<T>where
T::Private: Debug,
impl<T: Debug + PropertyKeyKind> Debug for PropertyKey<T>where T::Private: Debug,
source§impl<T: PartialEq + PropertyKeyKind> PartialEq<PropertyKey<T>> for PropertyKey<T>where
T::Private: PartialEq,
impl<T: PartialEq + PropertyKeyKind> PartialEq<PropertyKey<T>> for PropertyKey<T>where T::Private: PartialEq,
source§fn eq(&self, other: &PropertyKey<T>) -> bool
fn eq(&self, other: &PropertyKey<T>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<U: PropertyKeyKind> PartialEq<str> for PropertyKey<U>
impl<U: PropertyKeyKind> PartialEq<str> for PropertyKey<U>
source§impl<T: PropertyKeyKind> SelfRustTokenize for PropertyKey<T>where
T::Private: SelfRustTokenize,
impl<T: PropertyKeyKind> SelfRustTokenize for PropertyKey<T>where T::Private: SelfRustTokenize,
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: PropertyKeyKind> Serialize for PropertyKey<T>where
T::Private: Serialize,
impl<T: PropertyKeyKind> Serialize for PropertyKey<T>where T::Private: Serialize,
source§impl Visitable for PropertyKey<AlwaysPublic>
impl Visitable for PropertyKey<AlwaysPublic>
fn visit<TData>( &self, _visitors: &mut (impl VisitorReceiver<TData> + ?Sized), _data: &mut TData, _settings: &VisitSettings, _chain: &mut Annex<'_, Chain> )
fn visit_mut<TData>( &mut self, _visitors: &mut (impl VisitorMutReceiver<TData> + ?Sized), _data: &mut TData, _settings: &VisitSettings, _chain: &mut Annex<'_, Chain> )
source§impl Visitable for PropertyKey<PublicOrPrivate>
impl Visitable for PropertyKey<PublicOrPrivate>
fn visit<TData>( &self, _visitors: &mut (impl VisitorReceiver<TData> + ?Sized), _data: &mut TData, _settings: &VisitSettings, _chain: &mut Annex<'_, Chain> )
fn visit_mut<TData>( &mut self, _visitors: &mut (impl VisitorMutReceiver<TData> + ?Sized), _data: &mut TData, _settings: &VisitSettings, _chain: &mut Annex<'_, Chain> )
impl<T: Eq + PropertyKeyKind> Eq for PropertyKey<T>where T::Private: Eq,
impl<T: PropertyKeyKind> StructuralEq for PropertyKey<T>
impl<T: PropertyKeyKind> StructuralPartialEq for PropertyKey<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for PropertyKey<T>where <T as PropertyKeyKind>::Private: RefUnwindSafe,
impl<T> Send for PropertyKey<T>
impl<T> Sync for PropertyKey<T>
impl<T> Unpin for PropertyKey<T>where <T as PropertyKeyKind>::Private: Unpin,
impl<T> UnwindSafe for PropertyKey<T>where <T as PropertyKeyKind>::Private: UnwindSafe,
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