Skip to main content

FromNode

Trait FromNode 

Source
pub trait FromNode<'tree>: Sized {
    // Required method
    fn from_node(
        node: Node<'tree>,
        src: &'tree [u8],
    ) -> Result<Self, ParseError>;
}
Expand description

Every generated struct and enum implements this.

Required Methods§

Source

fn from_node(node: Node<'tree>, src: &'tree [u8]) -> Result<Self, ParseError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'tree> FromNode<'tree> for ArgumentsChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ArrayChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ArrayPatternChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ArrowFunctionBody<'tree>

Source§

impl<'tree> FromNode<'tree> for AssignmentExpressionLeft<'tree>

Source§

impl<'tree> FromNode<'tree> for AugmentedAssignmentExpressionLeft<'tree>

Source§

impl<'tree> FromNode<'tree> for AugmentedAssignmentExpressionOperator

Source§

impl<'tree> FromNode<'tree> for BinaryExpressionLeft<'tree>

Source§

impl<'tree> FromNode<'tree> for BinaryExpressionOperator

Source§

impl<'tree> FromNode<'tree> for CallExpressionArguments<'tree>

Source§

impl<'tree> FromNode<'tree> for CallExpressionFunction<'tree>

Source§

impl<'tree> FromNode<'tree> for CatchClauseParameter<'tree>

Source§

impl<'tree> FromNode<'tree> for ClassBodyMember<'tree>

Source§

impl<'tree> FromNode<'tree> for Declaration<'tree>

Source§

impl<'tree> FromNode<'tree> for DecoratorChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ExportSpecifierAlias<'tree>

Source§

impl<'tree> FromNode<'tree> for ExportSpecifierName<'tree>

Source§

impl<'tree> FromNode<'tree> for ExportStatementChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for Expression<'tree>

Source§

impl<'tree> FromNode<'tree> for ExpressionStatementChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldDefinitionProperty<'tree>

Source§

impl<'tree> FromNode<'tree> for ForInStatementKind

Source§

impl<'tree> FromNode<'tree> for ForInStatementLeft<'tree>

Source§

impl<'tree> FromNode<'tree> for ForInStatementOperator

Source§

impl<'tree> FromNode<'tree> for ForInStatementRight<'tree>

Source§

impl<'tree> FromNode<'tree> for ForStatementCondition<'tree>

Source§

impl<'tree> FromNode<'tree> for ForStatementIncrement<'tree>

Source§

impl<'tree> FromNode<'tree> for ForStatementInitializer<'tree>

Source§

impl<'tree> FromNode<'tree> for FormalParametersChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ImportClauseChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ImportSpecifierName<'tree>

Source§

impl<'tree> FromNode<'tree> for ImportStatementChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxAttributeChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxClosingElementName<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxElementChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxExpressionChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxOpeningElementAttribute<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxOpeningElementName<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxSelfClosingElementAttribute<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxSelfClosingElementName<'tree>

Source§

impl<'tree> FromNode<'tree> for LexicalDeclarationKind

Source§

impl<'tree> FromNode<'tree> for MemberExpressionObject<'tree>

Source§

impl<'tree> FromNode<'tree> for MemberExpressionProperty<'tree>

Source§

impl<'tree> FromNode<'tree> for MethodDefinitionName<'tree>

Source§

impl<'tree> FromNode<'tree> for NamespaceExportChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for NewExpressionConstructor<'tree>

Source§

impl<'tree> FromNode<'tree> for ObjectAssignmentPatternLeft<'tree>

Source§

impl<'tree> FromNode<'tree> for ObjectChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ObjectPatternChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for PairKey<'tree>

Source§

impl<'tree> FromNode<'tree> for PairPatternKey<'tree>

Source§

impl<'tree> FromNode<'tree> for PairPatternValue<'tree>

Source§

impl<'tree> FromNode<'tree> for ParenthesizedExpressionChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for Pattern<'tree>

Source§

impl<'tree> FromNode<'tree> for PrimaryExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for ProgramChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for RestPatternChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ReturnStatementChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for Statement<'tree>

Source§

impl<'tree> FromNode<'tree> for StringChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for SubscriptExpressionIndex<'tree>

Source§

impl<'tree> FromNode<'tree> for SwitchBodyChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for SwitchCaseValue<'tree>

Source§

impl<'tree> FromNode<'tree> for TemplateStringChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for TemplateSubstitutionChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ThrowStatementChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for UnaryExpressionOperator

Source§

impl<'tree> FromNode<'tree> for UpdateExpressionOperator

Source§

impl<'tree> FromNode<'tree> for UsingDeclarationKind

Source§

impl<'tree> FromNode<'tree> for VariableDeclaratorName<'tree>

Source§

impl<'tree> FromNode<'tree> for Arguments<'tree>

Source§

impl<'tree> FromNode<'tree> for Array<'tree>

Source§

impl<'tree> FromNode<'tree> for ArrayPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for ArrowFunction<'tree>

Source§

impl<'tree> FromNode<'tree> for AssignmentExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for AssignmentPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for AugmentedAssignmentExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for AwaitExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for BinaryExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for BreakStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for CallExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for CatchClause<'tree>

Source§

impl<'tree> FromNode<'tree> for Class<'tree>

Source§

impl<'tree> FromNode<'tree> for ClassBody<'tree>

Source§

impl<'tree> FromNode<'tree> for ClassDeclaration<'tree>

Source§

impl<'tree> FromNode<'tree> for ClassHeritage<'tree>

Source§

impl<'tree> FromNode<'tree> for ClassStaticBlock<'tree>

Source§

impl<'tree> FromNode<'tree> for Comment<'tree>

Source§

impl<'tree> FromNode<'tree> for ComputedPropertyName<'tree>

Source§

impl<'tree> FromNode<'tree> for ContinueStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for DebuggerStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for Decorator<'tree>

Source§

impl<'tree> FromNode<'tree> for DoStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for ElseClause<'tree>

Source§

impl<'tree> FromNode<'tree> for EmptyStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for EscapeSequence<'tree>

Source§

impl<'tree> FromNode<'tree> for ExportClause<'tree>

Source§

impl<'tree> FromNode<'tree> for ExportSpecifier<'tree>

Source§

impl<'tree> FromNode<'tree> for ExportStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for ExpressionStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for False<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldDefinition<'tree>

Source§

impl<'tree> FromNode<'tree> for FinallyClause<'tree>

Source§

impl<'tree> FromNode<'tree> for ForInStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for ForStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for FormalParameters<'tree>

Source§

impl<'tree> FromNode<'tree> for FunctionDeclaration<'tree>

Source§

impl<'tree> FromNode<'tree> for FunctionExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for GeneratorFunction<'tree>

Source§

impl<'tree> FromNode<'tree> for GeneratorFunctionDeclaration<'tree>

Source§

impl<'tree> FromNode<'tree> for HashBangLine<'tree>

Source§

impl<'tree> FromNode<'tree> for HtmlCharacterReference<'tree>

Source§

impl<'tree> FromNode<'tree> for HtmlComment<'tree>

Source§

impl<'tree> FromNode<'tree> for Identifier<'tree>

Source§

impl<'tree> FromNode<'tree> for IfStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for Import<'tree>

Source§

impl<'tree> FromNode<'tree> for ImportAttribute<'tree>

Source§

impl<'tree> FromNode<'tree> for ImportClause<'tree>

Source§

impl<'tree> FromNode<'tree> for ImportSpecifier<'tree>

Source§

impl<'tree> FromNode<'tree> for ImportStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxAttribute<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxClosingElement<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxElement<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxNamespaceName<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxOpeningElement<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxSelfClosingElement<'tree>

Source§

impl<'tree> FromNode<'tree> for JsxText<'tree>

Source§

impl<'tree> FromNode<'tree> for LabeledStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for LexicalDeclaration<'tree>

Source§

impl<'tree> FromNode<'tree> for MemberExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for MetaProperty<'tree>

Source§

impl<'tree> FromNode<'tree> for MethodDefinition<'tree>

Source§

impl<'tree> FromNode<'tree> for NamedImports<'tree>

Source§

impl<'tree> FromNode<'tree> for NamespaceExport<'tree>

Source§

impl<'tree> FromNode<'tree> for NamespaceImport<'tree>

Source§

impl<'tree> FromNode<'tree> for NewExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for Null<'tree>

Source§

impl<'tree> FromNode<'tree> for Number<'tree>

Source§

impl<'tree> FromNode<'tree> for Object<'tree>

Source§

impl<'tree> FromNode<'tree> for ObjectAssignmentPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for ObjectPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for OptionalChain<'tree>

Source§

impl<'tree> FromNode<'tree> for Pair<'tree>

Source§

impl<'tree> FromNode<'tree> for PairPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for ParenthesizedExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for PrivatePropertyIdentifier<'tree>

Source§

impl<'tree> FromNode<'tree> for Program<'tree>

Source§

impl<'tree> FromNode<'tree> for PropertyIdentifier<'tree>

Source§

impl<'tree> FromNode<'tree> for Regex<'tree>

Source§

impl<'tree> FromNode<'tree> for RegexFlags<'tree>

Source§

impl<'tree> FromNode<'tree> for RegexPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for RestPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for ReturnStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for SequenceExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for ShorthandPropertyIdentifier<'tree>

Source§

impl<'tree> FromNode<'tree> for ShorthandPropertyIdentifierPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for SpreadElement<'tree>

Source§

impl<'tree> FromNode<'tree> for StatementBlock<'tree>

Source§

impl<'tree> FromNode<'tree> for StatementIdentifier<'tree>

Source§

impl<'tree> FromNode<'tree> for String<'tree>

Source§

impl<'tree> FromNode<'tree> for StringFragment<'tree>

Source§

impl<'tree> FromNode<'tree> for SubscriptExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for Super<'tree>

Source§

impl<'tree> FromNode<'tree> for SwitchBody<'tree>

Source§

impl<'tree> FromNode<'tree> for SwitchCase<'tree>

Source§

impl<'tree> FromNode<'tree> for SwitchDefault<'tree>

Source§

impl<'tree> FromNode<'tree> for SwitchStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for TemplateString<'tree>

Source§

impl<'tree> FromNode<'tree> for TemplateSubstitution<'tree>

Source§

impl<'tree> FromNode<'tree> for TernaryExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for This<'tree>

Source§

impl<'tree> FromNode<'tree> for ThrowStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for True<'tree>

Source§

impl<'tree> FromNode<'tree> for TryStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for UnaryExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for Undefined<'tree>

Source§

impl<'tree> FromNode<'tree> for UpdateExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for UsingDeclaration<'tree>

Source§

impl<'tree> FromNode<'tree> for VariableDeclaration<'tree>

Source§

impl<'tree> FromNode<'tree> for VariableDeclarator<'tree>

Source§

impl<'tree> FromNode<'tree> for WhileStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for WithStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for YieldExpression<'tree>