Struct ezno_parser::declarations::variable::VariableDeclarationItem
source · pub struct VariableDeclarationItem<TExpr: DeclarationExpression> {
pub name: WithComment<VariableField>,
pub type_annotation: Option<TypeAnnotation>,
pub expression: TExpr,
pub position: Span,
}
Expand description
Represents a name =
Fields§
§name: WithComment<VariableField>
§type_annotation: Option<TypeAnnotation>
§expression: TExpr
§position: Span
Trait Implementations§
source§impl<TExpr: DeclarationExpression + 'static> ASTNode for VariableDeclarationItem<TExpr>
impl<TExpr: DeclarationExpression + 'static> ASTNode for VariableDeclarationItem<TExpr>
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, local: LocalToStringInformation )
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 sourcesource§fn from_string(script: String, options: ParseOptions) -> ParseResult<Self>
fn from_string(script: String, options: ParseOptions) -> ParseResult<Self>
From string, with default impl to call abstract method
from_reader
fn from_string_with_options( script: String, options: ParseOptions, offset: Option<u32> ) -> ParseResult<(Self, ParsingState)>
source§fn to_string(&self, options: &ToStringOptions) -> String
fn to_string(&self, options: &ToStringOptions) -> String
Returns structure as valid string
source§impl<TExpr: Clone + DeclarationExpression> Clone for VariableDeclarationItem<TExpr>
impl<TExpr: Clone + DeclarationExpression> Clone for VariableDeclarationItem<TExpr>
source§fn clone(&self) -> VariableDeclarationItem<TExpr>
fn clone(&self) -> VariableDeclarationItem<TExpr>
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<TExpr: Debug + DeclarationExpression> Debug for VariableDeclarationItem<TExpr>
impl<TExpr: Debug + DeclarationExpression> Debug for VariableDeclarationItem<TExpr>
source§impl<TExpr: DeclarationExpression> GetFieldByType<BaseSpan<()>> for VariableDeclarationItem<TExpr>
impl<TExpr: DeclarationExpression> GetFieldByType<BaseSpan<()>> for VariableDeclarationItem<TExpr>
source§impl<TExpr> PartialEq for VariableDeclarationItem<TExpr>where
TExpr: PartialEq + DeclarationExpression,
impl<TExpr> PartialEq for VariableDeclarationItem<TExpr>where
TExpr: PartialEq + DeclarationExpression,
source§impl<TExpr> SelfRustTokenize for VariableDeclarationItem<TExpr>where
TExpr: SelfRustTokenize + DeclarationExpression,
impl<TExpr> SelfRustTokenize for VariableDeclarationItem<TExpr>where
TExpr: SelfRustTokenize + DeclarationExpression,
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<TExpr> Serialize for VariableDeclarationItem<TExpr>where
TExpr: Serialize + DeclarationExpression,
impl<TExpr> Serialize for VariableDeclarationItem<TExpr>where
TExpr: Serialize + DeclarationExpression,
source§impl<TExpr> Visitable for VariableDeclarationItem<TExpr>where
TExpr: Visitable + DeclarationExpression,
impl<TExpr> Visitable for VariableDeclarationItem<TExpr>where
TExpr: Visitable + DeclarationExpression,
fn visit<TData>( &self, visitors: &mut (impl VisitorReceiver<TData> + ?Sized), data: &mut TData, options: &VisitOptions, chain: &mut Annex<'_, Chain> )
fn visit_mut<TData>( &mut self, visitors: &mut (impl VisitorMutReceiver<TData> + ?Sized), data: &mut TData, options: &VisitOptions, chain: &mut Annex<'_, Chain> )
Auto Trait Implementations§
impl<TExpr> Freeze for VariableDeclarationItem<TExpr>where
TExpr: Freeze,
impl<TExpr> RefUnwindSafe for VariableDeclarationItem<TExpr>where
TExpr: RefUnwindSafe,
impl<TExpr> Send for VariableDeclarationItem<TExpr>
impl<TExpr> Sync for VariableDeclarationItem<TExpr>
impl<TExpr> Unpin for VariableDeclarationItem<TExpr>where
TExpr: Unpin,
impl<TExpr> UnwindSafe for VariableDeclarationItem<TExpr>where
TExpr: 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