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 AbstractTypeTrait<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for ArrayExpressionChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for AttributeChildren<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for BlockChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for BoundedTypeChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for BracketedTypeChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for BreakExpressionChildren<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for ClosureExpressionBody<'tree>

Source§

impl<'tree> FromNode<'tree> for ClosureParametersChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for CompoundAssignmentExprOperator

Source§

impl<'tree> FromNode<'tree> for ConstParameterValue<'tree>

Source§

impl<'tree> FromNode<'tree> for DeclarationStatement<'tree>

Source§

impl<'tree> FromNode<'tree> for DynamicTypeTrait<'tree>

Source§

impl<'tree> FromNode<'tree> for ElseClauseChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for EnumItemChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for EnumVariantBody<'tree>

Source§

impl<'tree> FromNode<'tree> for EnumVariantListChildren<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for ExternCrateDeclarationChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldDeclarationListChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldExpressionField<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldInitializerField<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldInitializerListChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldPatternName<'tree>

Source§

impl<'tree> FromNode<'tree> for FunctionItemChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for FunctionItemName<'tree>

Source§

impl<'tree> FromNode<'tree> for FunctionSignatureItemChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for FunctionSignatureItemName<'tree>

Source§

impl<'tree> FromNode<'tree> for FunctionTypeChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for FunctionTypeTrait<'tree>

Source§

impl<'tree> FromNode<'tree> for GenericFunctionFunction<'tree>

Source§

impl<'tree> FromNode<'tree> for GenericPatternChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for GenericTypeType<'tree>

Source§

impl<'tree> FromNode<'tree> for GenericTypeWithTurbofishType<'tree>

Source§

impl<'tree> FromNode<'tree> for IfExpressionCondition<'tree>

Source§

impl<'tree> FromNode<'tree> for ImplItemTrait<'tree>

Source§

impl<'tree> FromNode<'tree> for LetChainChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for Literal<'tree>

Source§

impl<'tree> FromNode<'tree> for LiteralPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for MacroInvocationMacro<'tree>

Source§

impl<'tree> FromNode<'tree> for MatchArmChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for MatchPatternCondition<'tree>

Source§

impl<'tree> FromNode<'tree> for MutPatternChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for NegativeLiteralChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for OrderedFieldDeclarationListChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ParameterPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for ParametersChildren<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for RangePatternLeft<'tree>

Source§

impl<'tree> FromNode<'tree> for RangePatternRight<'tree>

Source§

impl<'tree> FromNode<'tree> for ReferencePatternChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ReferenceTypeChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ScopedIdentifierName<'tree>

Source§

impl<'tree> FromNode<'tree> for ScopedIdentifierPath<'tree>

Source§

impl<'tree> FromNode<'tree> for ScopedTypeIdentifierPath<'tree>

Source§

impl<'tree> FromNode<'tree> for ScopedUseListPath<'tree>

Source§

impl<'tree> FromNode<'tree> for SelfParameterChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for ShorthandFieldInitializerChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for SourceFileChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for StaticItemChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for StringLiteralChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for StructExpressionName<'tree>

Source§

impl<'tree> FromNode<'tree> for StructItemBody<'tree>

Source§

impl<'tree> FromNode<'tree> for StructItemChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for StructPatternChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for StructPatternType<'tree>

Source§

impl<'tree> FromNode<'tree> for TokenRepetitionChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for TokenRepetitionPatternChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for TokenTreeChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for TokenTreePatternChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for TraitBoundsChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for TraitItemChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for TupleExpressionChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for TuplePatternChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for TupleStructPatternType<'tree>

Source§

impl<'tree> FromNode<'tree> for Type<'tree>

Source§

impl<'tree> FromNode<'tree> for TypeArgumentsChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for TypeItemChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for TypeParametersChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for UnionItemChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for UseAsClausePath<'tree>

Source§

impl<'tree> FromNode<'tree> for UseBoundsChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for UseDeclarationArgument<'tree>

Source§

impl<'tree> FromNode<'tree> for UseListChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for UseWildcardChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for VisibilityModifierChildren<'tree>

Source§

impl<'tree> FromNode<'tree> for WherePredicateLeft<'tree>

Source§

impl<'tree> FromNode<'tree> for WhileExpressionCondition<'tree>

Source§

impl<'tree> FromNode<'tree> for AbstractType<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for ArrayExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for ArrayType<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for AssociatedType<'tree>

Source§

impl<'tree> FromNode<'tree> for AsyncBlock<'tree>

Source§

impl<'tree> FromNode<'tree> for Attribute<'tree>

Source§

impl<'tree> FromNode<'tree> for AttributeItem<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for BaseFieldInitializer<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for Block<'tree>

Source§

impl<'tree> FromNode<'tree> for BlockComment<'tree>

Source§

impl<'tree> FromNode<'tree> for BooleanLiteral<'tree>

Source§

impl<'tree> FromNode<'tree> for BoundedType<'tree>

Source§

impl<'tree> FromNode<'tree> for BracketedType<'tree>

Source§

impl<'tree> FromNode<'tree> for BreakExpression<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for CapturedPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for CharLiteral<'tree>

Source§

impl<'tree> FromNode<'tree> for ClosureExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for ClosureParameters<'tree>

Source§

impl<'tree> FromNode<'tree> for CompoundAssignmentExpr<'tree>

Source§

impl<'tree> FromNode<'tree> for ConstBlock<'tree>

Source§

impl<'tree> FromNode<'tree> for ConstItem<'tree>

Source§

impl<'tree> FromNode<'tree> for ConstParameter<'tree>

Source§

impl<'tree> FromNode<'tree> for ContinueExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for Crate<'tree>

Source§

impl<'tree> FromNode<'tree> for DeclarationList<'tree>

Source§

impl<'tree> FromNode<'tree> for DocComment<'tree>

Source§

impl<'tree> FromNode<'tree> for DynamicType<'tree>

Source§

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

Source§

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

Source§

impl<'tree> FromNode<'tree> for EnumItem<'tree>

Source§

impl<'tree> FromNode<'tree> for EnumVariant<'tree>

Source§

impl<'tree> FromNode<'tree> for EnumVariantList<'tree>

Source§

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

Source§

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

Source§

impl<'tree> FromNode<'tree> for ExternCrateDeclaration<'tree>

Source§

impl<'tree> FromNode<'tree> for ExternModifier<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldDeclaration<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldDeclarationList<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldIdentifier<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldInitializer<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldInitializerList<'tree>

Source§

impl<'tree> FromNode<'tree> for FieldPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for FloatLiteral<'tree>

Source§

impl<'tree> FromNode<'tree> for ForExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for ForLifetimes<'tree>

Source§

impl<'tree> FromNode<'tree> for ForeignModItem<'tree>

Source§

impl<'tree> FromNode<'tree> for FragmentSpecifier<'tree>

Source§

impl<'tree> FromNode<'tree> for FunctionItem<'tree>

Source§

impl<'tree> FromNode<'tree> for FunctionModifiers<'tree>

Source§

impl<'tree> FromNode<'tree> for FunctionSignatureItem<'tree>

Source§

impl<'tree> FromNode<'tree> for FunctionType<'tree>

Source§

impl<'tree> FromNode<'tree> for GenBlock<'tree>

Source§

impl<'tree> FromNode<'tree> for GenericFunction<'tree>

Source§

impl<'tree> FromNode<'tree> for GenericPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for GenericType<'tree>

Source§

impl<'tree> FromNode<'tree> for GenericTypeWithTurbofish<'tree>

Source§

impl<'tree> FromNode<'tree> for HigherRankedTraitBound<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for IfExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for ImplItem<'tree>

Source§

impl<'tree> FromNode<'tree> for IndexExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for InnerAttributeItem<'tree>

Source§

impl<'tree> FromNode<'tree> for InnerDocCommentMarker<'tree>

Source§

impl<'tree> FromNode<'tree> for IntegerLiteral<'tree>

Source§

impl<'tree> FromNode<'tree> for Label<'tree>

Source§

impl<'tree> FromNode<'tree> for LetChain<'tree>

Source§

impl<'tree> FromNode<'tree> for LetCondition<'tree>

Source§

impl<'tree> FromNode<'tree> for LetDeclaration<'tree>

Source§

impl<'tree> FromNode<'tree> for Lifetime<'tree>

Source§

impl<'tree> FromNode<'tree> for LifetimeParameter<'tree>

Source§

impl<'tree> FromNode<'tree> for LineComment<'tree>

Source§

impl<'tree> FromNode<'tree> for LoopExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for MacroDefinition<'tree>

Source§

impl<'tree> FromNode<'tree> for MacroInvocation<'tree>

Source§

impl<'tree> FromNode<'tree> for MacroRule<'tree>

Source§

impl<'tree> FromNode<'tree> for MatchArm<'tree>

Source§

impl<'tree> FromNode<'tree> for MatchBlock<'tree>

Source§

impl<'tree> FromNode<'tree> for MatchExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for MatchPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for Metavariable<'tree>

Source§

impl<'tree> FromNode<'tree> for ModItem<'tree>

Source§

impl<'tree> FromNode<'tree> for MutPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for MutableSpecifier<'tree>

Source§

impl<'tree> FromNode<'tree> for NegativeLiteral<'tree>

Source§

impl<'tree> FromNode<'tree> for NeverType<'tree>

Source§

impl<'tree> FromNode<'tree> for OrPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for OrderedFieldDeclarationList<'tree>

Source§

impl<'tree> FromNode<'tree> for OuterDocCommentMarker<'tree>

Source§

impl<'tree> FromNode<'tree> for Parameter<'tree>

Source§

impl<'tree> FromNode<'tree> for Parameters<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for PointerType<'tree>

Source§

impl<'tree> FromNode<'tree> for PrimitiveType<'tree>

Source§

impl<'tree> FromNode<'tree> for QualifiedType<'tree>

Source§

impl<'tree> FromNode<'tree> for RangeExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for RangePattern<'tree>

Source§

impl<'tree> FromNode<'tree> for RawStringLiteral<'tree>

Source§

impl<'tree> FromNode<'tree> for RefPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for ReferenceExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for ReferencePattern<'tree>

Source§

impl<'tree> FromNode<'tree> for ReferenceType<'tree>

Source§

impl<'tree> FromNode<'tree> for RemainingFieldPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for RemovedTraitBound<'tree>

Source§

impl<'tree> FromNode<'tree> for ReturnExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for ScopedIdentifier<'tree>

Source§

impl<'tree> FromNode<'tree> for ScopedTypeIdentifier<'tree>

Source§

impl<'tree> FromNode<'tree> for ScopedUseList<'tree>

Source§

impl<'tree> FromNode<'tree> for SelfParameter<'tree>

Source§

impl<'tree> FromNode<'tree> for SelfType<'tree>

Source§

impl<'tree> FromNode<'tree> for Shebang<'tree>

Source§

impl<'tree> FromNode<'tree> for ShorthandFieldIdentifier<'tree>

Source§

impl<'tree> FromNode<'tree> for ShorthandFieldInitializer<'tree>

Source§

impl<'tree> FromNode<'tree> for SlicePattern<'tree>

Source§

impl<'tree> FromNode<'tree> for SourceFile<'tree>

Source§

impl<'tree> FromNode<'tree> for StaticItem<'tree>

Source§

impl<'tree> FromNode<'tree> for StringContent<'tree>

Source§

impl<'tree> FromNode<'tree> for StringLiteral<'tree>

Source§

impl<'tree> FromNode<'tree> for StructExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for StructItem<'tree>

Source§

impl<'tree> FromNode<'tree> for StructPattern<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for TokenBindingPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for TokenRepetition<'tree>

Source§

impl<'tree> FromNode<'tree> for TokenRepetitionPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for TokenTree<'tree>

Source§

impl<'tree> FromNode<'tree> for TokenTreePattern<'tree>

Source§

impl<'tree> FromNode<'tree> for TraitBounds<'tree>

Source§

impl<'tree> FromNode<'tree> for TraitItem<'tree>

Source§

impl<'tree> FromNode<'tree> for TryBlock<'tree>

Source§

impl<'tree> FromNode<'tree> for TryExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for TupleExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for TuplePattern<'tree>

Source§

impl<'tree> FromNode<'tree> for TupleStructPattern<'tree>

Source§

impl<'tree> FromNode<'tree> for TupleType<'tree>

Source§

impl<'tree> FromNode<'tree> for TypeArguments<'tree>

Source§

impl<'tree> FromNode<'tree> for TypeBinding<'tree>

Source§

impl<'tree> FromNode<'tree> for TypeCastExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for TypeIdentifier<'tree>

Source§

impl<'tree> FromNode<'tree> for TypeItem<'tree>

Source§

impl<'tree> FromNode<'tree> for TypeParameter<'tree>

Source§

impl<'tree> FromNode<'tree> for TypeParameters<'tree>

Source§

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

Source§

impl<'tree> FromNode<'tree> for UnionItem<'tree>

Source§

impl<'tree> FromNode<'tree> for UnitExpression<'tree>

Source§

impl<'tree> FromNode<'tree> for UnitType<'tree>

Source§

impl<'tree> FromNode<'tree> for UnsafeBlock<'tree>

Source§

impl<'tree> FromNode<'tree> for UseAsClause<'tree>

Source§

impl<'tree> FromNode<'tree> for UseBounds<'tree>

Source§

impl<'tree> FromNode<'tree> for UseDeclaration<'tree>

Source§

impl<'tree> FromNode<'tree> for UseList<'tree>

Source§

impl<'tree> FromNode<'tree> for UseWildcard<'tree>

Source§

impl<'tree> FromNode<'tree> for VariadicParameter<'tree>

Source§

impl<'tree> FromNode<'tree> for VisibilityModifier<'tree>

Source§

impl<'tree> FromNode<'tree> for WhereClause<'tree>

Source§

impl<'tree> FromNode<'tree> for WherePredicate<'tree>

Source§

impl<'tree> FromNode<'tree> for WhileExpression<'tree>

Source§

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