Skip to main content

NodeArena

Struct NodeArena 

Source
pub struct NodeArena {
Show 94 fields pub nodes: Vec<Node>, pub interner: Interner, pub identifiers: Vec<IdentifierData>, pub qualified_names: Vec<QualifiedNameData>, pub computed_properties: Vec<ComputedPropertyData>, pub literals: Vec<LiteralData>, pub binary_exprs: Vec<BinaryExprData>, pub unary_exprs: Vec<UnaryExprData>, pub call_exprs: Vec<CallExprData>, pub access_exprs: Vec<AccessExprData>, pub conditional_exprs: Vec<ConditionalExprData>, pub literal_exprs: Vec<LiteralExprData>, pub parenthesized: Vec<ParenthesizedData>, pub unary_exprs_ex: Vec<UnaryExprDataEx>, pub type_assertions: Vec<TypeAssertionData>, pub template_exprs: Vec<TemplateExprData>, pub template_spans: Vec<TemplateSpanData>, pub tagged_templates: Vec<TaggedTemplateData>, pub functions: Vec<FunctionData>, pub classes: Vec<ClassData>, pub interfaces: Vec<InterfaceData>, pub type_aliases: Vec<TypeAliasData>, pub enums: Vec<EnumData>, pub enum_members: Vec<EnumMemberData>, pub modules: Vec<ModuleData>, pub module_blocks: Vec<ModuleBlockData>, pub signatures: Vec<SignatureData>, pub index_signatures: Vec<IndexSignatureData>, pub property_decls: Vec<PropertyDeclData>, pub method_decls: Vec<MethodDeclData>, pub constructors: Vec<ConstructorData>, pub accessors: Vec<AccessorData>, pub parameters: Vec<ParameterData>, pub type_parameters: Vec<TypeParameterData>, pub decorators: Vec<DecoratorData>, pub heritage_clauses: Vec<HeritageData>, pub expr_with_type_args: Vec<ExprWithTypeArgsData>, pub if_statements: Vec<IfStatementData>, pub loops: Vec<LoopData>, pub blocks: Vec<BlockData>, pub variables: Vec<VariableData>, pub return_data: Vec<ReturnData>, pub expr_statements: Vec<ExprStatementData>, pub switch_data: Vec<SwitchData>, pub case_clauses: Vec<CaseClauseData>, pub try_data: Vec<TryData>, pub catch_clauses: Vec<CatchClauseData>, pub labeled_data: Vec<LabeledData>, pub jump_data: Vec<JumpData>, pub with_data: Vec<WithData>, pub type_refs: Vec<TypeRefData>, pub composite_types: Vec<CompositeTypeData>, pub function_types: Vec<FunctionTypeData>, pub type_queries: Vec<TypeQueryData>, pub type_literals: Vec<TypeLiteralData>, pub array_types: Vec<ArrayTypeData>, pub tuple_types: Vec<TupleTypeData>, pub wrapped_types: Vec<WrappedTypeData>, pub conditional_types: Vec<ConditionalTypeData>, pub infer_types: Vec<InferTypeData>, pub type_operators: Vec<TypeOperatorData>, pub indexed_access_types: Vec<IndexedAccessTypeData>, pub mapped_types: Vec<MappedTypeData>, pub literal_types: Vec<LiteralTypeData>, pub template_literal_types: Vec<TemplateLiteralTypeData>, pub named_tuple_members: Vec<NamedTupleMemberData>, pub type_predicates: Vec<TypePredicateData>, pub import_decls: Vec<ImportDeclData>, pub import_clauses: Vec<ImportClauseData>, pub named_imports: Vec<NamedImportsData>, pub specifiers: Vec<SpecifierData>, pub export_decls: Vec<ExportDeclData>, pub export_assignments: Vec<ExportAssignmentData>, pub import_attributes: Vec<ImportAttributesData>, pub import_attribute: Vec<ImportAttributeData>, pub binding_patterns: Vec<BindingPatternData>, pub binding_elements: Vec<BindingElementData>, pub property_assignments: Vec<PropertyAssignmentData>, pub shorthand_properties: Vec<ShorthandPropertyData>, pub spread_data: Vec<SpreadData>, pub variable_declarations: Vec<VariableDeclarationData>, pub for_in_of: Vec<ForInOfData>, pub jsx_elements: Vec<JsxElementData>, pub jsx_opening: Vec<JsxOpeningData>, pub jsx_closing: Vec<JsxClosingData>, pub jsx_fragments: Vec<JsxFragmentData>, pub jsx_attributes: Vec<JsxAttributesData>, pub jsx_attribute: Vec<JsxAttributeData>, pub jsx_spread_attributes: Vec<JsxSpreadAttributeData>, pub jsx_expressions: Vec<JsxExpressionData>, pub jsx_text: Vec<JsxTextData>, pub jsx_namespaced_names: Vec<JsxNamespacedNameData>, pub source_files: Vec<SourceFileData>, pub extended_info: Vec<ExtendedNodeInfo>,
}
Expand description

Arena for thin nodes with typed data pools. Provides O(1) allocation and cache-efficient storage.

Fields§

§nodes: Vec<Node>

The thin node headers (16 bytes each)

§interner: Interner

String interner for resolving identifier atoms This is populated from the scanner after parsing completes

§identifiers: Vec<IdentifierData>§qualified_names: Vec<QualifiedNameData>§computed_properties: Vec<ComputedPropertyData>§literals: Vec<LiteralData>§binary_exprs: Vec<BinaryExprData>§unary_exprs: Vec<UnaryExprData>§call_exprs: Vec<CallExprData>§access_exprs: Vec<AccessExprData>§conditional_exprs: Vec<ConditionalExprData>§literal_exprs: Vec<LiteralExprData>§parenthesized: Vec<ParenthesizedData>§unary_exprs_ex: Vec<UnaryExprDataEx>§type_assertions: Vec<TypeAssertionData>§template_exprs: Vec<TemplateExprData>§template_spans: Vec<TemplateSpanData>§tagged_templates: Vec<TaggedTemplateData>§functions: Vec<FunctionData>§classes: Vec<ClassData>§interfaces: Vec<InterfaceData>§type_aliases: Vec<TypeAliasData>§enums: Vec<EnumData>§enum_members: Vec<EnumMemberData>§modules: Vec<ModuleData>§module_blocks: Vec<ModuleBlockData>§signatures: Vec<SignatureData>§index_signatures: Vec<IndexSignatureData>§property_decls: Vec<PropertyDeclData>§method_decls: Vec<MethodDeclData>§constructors: Vec<ConstructorData>§accessors: Vec<AccessorData>§parameters: Vec<ParameterData>§type_parameters: Vec<TypeParameterData>§decorators: Vec<DecoratorData>§heritage_clauses: Vec<HeritageData>§expr_with_type_args: Vec<ExprWithTypeArgsData>§if_statements: Vec<IfStatementData>§loops: Vec<LoopData>§blocks: Vec<BlockData>§variables: Vec<VariableData>§return_data: Vec<ReturnData>§expr_statements: Vec<ExprStatementData>§switch_data: Vec<SwitchData>§case_clauses: Vec<CaseClauseData>§try_data: Vec<TryData>§catch_clauses: Vec<CatchClauseData>§labeled_data: Vec<LabeledData>§jump_data: Vec<JumpData>§with_data: Vec<WithData>§type_refs: Vec<TypeRefData>§composite_types: Vec<CompositeTypeData>§function_types: Vec<FunctionTypeData>§type_queries: Vec<TypeQueryData>§type_literals: Vec<TypeLiteralData>§array_types: Vec<ArrayTypeData>§tuple_types: Vec<TupleTypeData>§wrapped_types: Vec<WrappedTypeData>§conditional_types: Vec<ConditionalTypeData>§infer_types: Vec<InferTypeData>§type_operators: Vec<TypeOperatorData>§indexed_access_types: Vec<IndexedAccessTypeData>§mapped_types: Vec<MappedTypeData>§literal_types: Vec<LiteralTypeData>§template_literal_types: Vec<TemplateLiteralTypeData>§named_tuple_members: Vec<NamedTupleMemberData>§type_predicates: Vec<TypePredicateData>§import_decls: Vec<ImportDeclData>§import_clauses: Vec<ImportClauseData>§named_imports: Vec<NamedImportsData>§specifiers: Vec<SpecifierData>§export_decls: Vec<ExportDeclData>§export_assignments: Vec<ExportAssignmentData>§import_attributes: Vec<ImportAttributesData>§import_attribute: Vec<ImportAttributeData>§binding_patterns: Vec<BindingPatternData>§binding_elements: Vec<BindingElementData>§property_assignments: Vec<PropertyAssignmentData>§shorthand_properties: Vec<ShorthandPropertyData>§spread_data: Vec<SpreadData>§variable_declarations: Vec<VariableDeclarationData>§for_in_of: Vec<ForInOfData>§jsx_elements: Vec<JsxElementData>§jsx_opening: Vec<JsxOpeningData>§jsx_closing: Vec<JsxClosingData>§jsx_fragments: Vec<JsxFragmentData>§jsx_attributes: Vec<JsxAttributesData>§jsx_attribute: Vec<JsxAttributeData>§jsx_spread_attributes: Vec<JsxSpreadAttributeData>§jsx_expressions: Vec<JsxExpressionData>§jsx_text: Vec<JsxTextData>§jsx_namespaced_names: Vec<JsxNamespacedNameData>§source_files: Vec<SourceFileData>§extended_info: Vec<ExtendedNodeInfo>

Implementations§

Source§

impl NodeArena

Source

pub fn get(&self, index: NodeIndex) -> Option<&Node>

Get a thin node by index

Source

pub fn get_mut(&mut self, index: NodeIndex) -> Option<&mut Node>

Get a mutable thin node by index

Source

pub fn get_extended(&self, index: NodeIndex) -> Option<&ExtendedNodeInfo>

Get extended info for a node

Source

pub fn get_extended_mut( &mut self, index: NodeIndex, ) -> Option<&mut ExtendedNodeInfo>

Get mutable extended info for a node

Source

pub fn get_identifier(&self, node: &Node) -> Option<&IdentifierData>

Get identifier data for a node. Returns None if node is not an identifier or has no data.

Source

pub fn get_literal(&self, node: &Node) -> Option<&LiteralData>

Get literal data for a node. Returns None if node is not a literal or has no data.

Source

pub fn get_binary_expr(&self, node: &Node) -> Option<&BinaryExprData>

Get binary expression data. Returns None if node is not a binary expression or has no data.

Source

pub fn get_call_expr(&self, node: &Node) -> Option<&CallExprData>

Get call expression data. Returns None if node is not a call/new expression or has no data.

Source

pub fn get_access_expr(&self, node: &Node) -> Option<&AccessExprData>

Get access expression data (property access or element access). Returns None if node is not an access expression or has no data.

Source

pub fn get_conditional_expr(&self, node: &Node) -> Option<&ConditionalExprData>

Get conditional expression data (ternary: a ? b : c). Returns None if node is not a conditional expression or has no data.

Source

pub fn get_qualified_name(&self, node: &Node) -> Option<&QualifiedNameData>

Get qualified name data (A.B syntax). Returns None if node is not a qualified name or has no data.

Source

pub fn get_literal_expr(&self, node: &Node) -> Option<&LiteralExprData>

Get literal expression data (array or object literal). Returns None if node is not a literal expression or has no data.

Source

pub fn get_property_assignment( &self, node: &Node, ) -> Option<&PropertyAssignmentData>

Get property assignment data. Returns None if node is not a property assignment or has no data.

Source

pub fn get_type_assertion(&self, node: &Node) -> Option<&TypeAssertionData>

Get type assertion data (as/satisfies/type assertion). Returns None if node is not a type assertion or has no data.

Source

pub fn get_unary_expr(&self, node: &Node) -> Option<&UnaryExprData>

Get unary expression data (prefix or postfix). Returns None if node is not a unary expression or has no data.

Source

pub fn get_unary_expr_ex(&self, node: &Node) -> Option<&UnaryExprDataEx>

Get extended unary expression data (await/yield/non-null/spread). Returns None if node is not an await/yield/non-null/spread expression or has no data.

Source

pub fn get_function(&self, node: &Node) -> Option<&FunctionData>

Get function data. Returns None if node is not a function-like node or has no data.

Source

pub fn get_class(&self, node: &Node) -> Option<&ClassData>

Get class data. Returns None if node is not a class declaration/expression or has no data.

Source

pub fn get_block(&self, node: &Node) -> Option<&BlockData>

Get block data. Returns None if node is not a block or has no data.

Source

pub fn get_source_file(&self, node: &Node) -> Option<&SourceFileData>

Get source file data. Returns None if node is not a source file or has no data.

Source

pub fn get_variable(&self, node: &Node) -> Option<&VariableData>

Get variable data (VariableStatement or VariableDeclarationList).

Source

pub fn get_variable_declaration( &self, node: &Node, ) -> Option<&VariableDeclarationData>

Get variable declaration data.

Source

pub fn get_interface(&self, node: &Node) -> Option<&InterfaceData>

Get interface data.

Source

pub fn get_type_alias(&self, node: &Node) -> Option<&TypeAliasData>

Get type alias data.

Source

pub fn get_enum(&self, node: &Node) -> Option<&EnumData>

Get enum data.

Source

pub fn get_enum_member(&self, node: &Node) -> Option<&EnumMemberData>

Get enum member data.

Source

pub fn get_module(&self, node: &Node) -> Option<&ModuleData>

Get module data.

Source

pub fn get_module_block(&self, node: &Node) -> Option<&ModuleBlockData>

Get module block data.

Source

pub fn get_if_statement(&self, node: &Node) -> Option<&IfStatementData>

Get if statement data.

Source

pub fn get_loop(&self, node: &Node) -> Option<&LoopData>

Get loop data (while, for, do-while).

Source

pub fn get_for_in_of(&self, node: &Node) -> Option<&ForInOfData>

Get for-in/for-of data.

Source

pub fn get_switch(&self, node: &Node) -> Option<&SwitchData>

Get switch data.

Source

pub fn get_case_clause(&self, node: &Node) -> Option<&CaseClauseData>

Get case clause data.

Source

pub fn get_try(&self, node: &Node) -> Option<&TryData>

Get try data.

Source

pub fn get_catch_clause(&self, node: &Node) -> Option<&CatchClauseData>

Get catch clause data.

Source

pub fn get_labeled_statement(&self, node: &Node) -> Option<&LabeledData>

Get labeled statement data.

Source

pub fn get_jump_data(&self, node: &Node) -> Option<&JumpData>

Get jump data (break/continue statements).

Source

pub fn get_with_statement(&self, node: &Node) -> Option<&IfStatementData>

Get with statement data (stored in if statement pool).

Source

pub fn get_import_decl(&self, node: &Node) -> Option<&ImportDeclData>

Get import declaration data (handles both IMPORT_DECLARATION and IMPORT_EQUALS_DECLARATION).

Source

pub fn get_import_clause(&self, node: &Node) -> Option<&ImportClauseData>

Get import clause data.

Source

pub fn get_named_imports(&self, node: &Node) -> Option<&NamedImportsData>

Get named imports/exports data. Works for NAMED_IMPORTS, NAMESPACE_IMPORT, and NAMED_EXPORTS (they share the same data structure).

Source

pub fn get_specifier(&self, node: &Node) -> Option<&SpecifierData>

Get import/export specifier data.

Source

pub fn get_export_decl(&self, node: &Node) -> Option<&ExportDeclData>

Get export declaration data.

Source

pub fn get_export_assignment( &self, node: &Node, ) -> Option<&ExportAssignmentData>

Get export assignment data (export = expr).

Source

pub fn get_parameter(&self, node: &Node) -> Option<&ParameterData>

Get parameter data.

Source

pub fn get_property_decl(&self, node: &Node) -> Option<&PropertyDeclData>

Get property declaration data.

Source

pub fn get_method_decl(&self, node: &Node) -> Option<&MethodDeclData>

Get method declaration data.

Source

pub fn get_constructor(&self, node: &Node) -> Option<&ConstructorData>

Get constructor data.

Source

pub fn get_accessor(&self, node: &Node) -> Option<&AccessorData>

Get accessor data (get/set accessor).

Source

pub fn get_decorator(&self, node: &Node) -> Option<&DecoratorData>

Get decorator data.

Source

pub fn get_type_ref(&self, node: &Node) -> Option<&TypeRefData>

Get type reference data.

Source

pub fn get_expression_statement( &self, node: &Node, ) -> Option<&ExprStatementData>

Get expression statement data (returns the expression node index).

Source

pub fn get_return_statement(&self, node: &Node) -> Option<&ReturnData>

Get return statement data (returns the expression node index).

Source

pub fn get_jsx_element(&self, node: &Node) -> Option<&JsxElementData>

Get JSX element data.

Source

pub fn get_jsx_opening(&self, node: &Node) -> Option<&JsxOpeningData>

Get JSX opening/self-closing element data.

Source

pub fn get_jsx_closing(&self, node: &Node) -> Option<&JsxClosingData>

Get JSX closing element data.

Source

pub fn get_jsx_fragment(&self, node: &Node) -> Option<&JsxFragmentData>

Get JSX fragment data.

Source

pub fn get_jsx_attributes(&self, node: &Node) -> Option<&JsxAttributesData>

Get JSX attributes data.

Source

pub fn get_jsx_attribute(&self, node: &Node) -> Option<&JsxAttributeData>

Get JSX attribute data.

Source

pub fn get_jsx_spread_attribute( &self, node: &Node, ) -> Option<&JsxSpreadAttributeData>

Get JSX spread attribute data.

Source

pub fn get_jsx_expression(&self, node: &Node) -> Option<&JsxExpressionData>

Get JSX expression data.

Source

pub fn get_jsx_text(&self, node: &Node) -> Option<&JsxTextData>

Get JSX text data.

Source

pub fn get_jsx_namespaced_name( &self, node: &Node, ) -> Option<&JsxNamespacedNameData>

Get JSX namespaced name data.

Source

pub fn get_signature(&self, node: &Node) -> Option<&SignatureData>

Get signature data (call, construct, method, property signatures).

Source

pub fn get_index_signature(&self, node: &Node) -> Option<&IndexSignatureData>

Get index signature data.

Source

pub fn get_heritage_clause(&self, node: &Node) -> Option<&HeritageData>

Get heritage clause data.

Source

pub fn get_composite_type(&self, node: &Node) -> Option<&CompositeTypeData>

Get composite type data (union or intersection).

Source

pub fn get_array_type(&self, node: &Node) -> Option<&ArrayTypeData>

Get array type data.

Source

pub fn get_tuple_type(&self, node: &Node) -> Option<&TupleTypeData>

Get tuple type data.

Source

pub fn get_function_type(&self, node: &Node) -> Option<&FunctionTypeData>

Get function type data.

Source

pub fn get_type_literal(&self, node: &Node) -> Option<&TypeLiteralData>

Get type literal data.

Source

pub fn get_conditional_type(&self, node: &Node) -> Option<&ConditionalTypeData>

Get conditional type data.

Source

pub fn get_mapped_type(&self, node: &Node) -> Option<&MappedTypeData>

Get mapped type data.

Source

pub fn get_indexed_access_type( &self, node: &Node, ) -> Option<&IndexedAccessTypeData>

Get indexed access type data.

Source

pub fn get_literal_type(&self, node: &Node) -> Option<&LiteralTypeData>

Get literal type data.

Source

pub fn get_wrapped_type(&self, node: &Node) -> Option<&WrappedTypeData>

Get wrapped type data (parenthesized, optional, rest types).

Source

pub fn get_heritage(&self, node: &Node) -> Option<&HeritageData>

Get heritage clause data.

Source

pub fn get_expr_type_args(&self, node: &Node) -> Option<&ExprWithTypeArgsData>

Get expression with type arguments data (e.g., extends Base<T>).

Source

pub fn get_type_query(&self, node: &Node) -> Option<&TypeQueryData>

Get type query data (typeof in type position).

Source

pub fn get_type_operator(&self, node: &Node) -> Option<&TypeOperatorData>

Get type operator data (keyof, unique, readonly).

Source

pub fn get_infer_type(&self, node: &Node) -> Option<&InferTypeData>

Get infer type data.

Source

pub fn get_template_literal_type( &self, node: &Node, ) -> Option<&TemplateLiteralTypeData>

Get template literal type data.

Source

pub fn get_named_tuple_member( &self, node: &Node, ) -> Option<&NamedTupleMemberData>

Get named tuple member data.

Source

pub fn get_type_predicate(&self, node: &Node) -> Option<&TypePredicateData>

Get type predicate data.

Source

pub fn get_type_parameter(&self, node: &Node) -> Option<&TypeParameterData>

Get type parameter data.

Source

pub fn get_parenthesized(&self, node: &Node) -> Option<&ParenthesizedData>

Get parenthesized expression data. Returns None if node is not a parenthesized expression or has no data.

Source

pub fn get_template_expr(&self, node: &Node) -> Option<&TemplateExprData>

Get template expression data.

Source

pub fn get_template_span(&self, node: &Node) -> Option<&TemplateSpanData>

Get template span data. Accepts both TEMPLATE_SPAN (expression-level) and TEMPLATE_LITERAL_TYPE_SPAN (type-level) since both store data in the same template_spans array.

Source

pub fn get_tagged_template(&self, node: &Node) -> Option<&TaggedTemplateData>

Get tagged template expression data.

Source

pub fn get_spread(&self, node: &Node) -> Option<&SpreadData>

Get spread element/assignment data.

Source

pub fn get_shorthand_property( &self, node: &Node, ) -> Option<&ShorthandPropertyData>

Get shorthand property assignment data.

Source

pub fn get_binding_pattern(&self, node: &Node) -> Option<&BindingPatternData>

Get binding pattern data (ObjectBindingPattern or ArrayBindingPattern).

Source

pub fn get_binding_element(&self, node: &Node) -> Option<&BindingElementData>

Get binding element data.

Source

pub fn get_computed_property( &self, node: &Node, ) -> Option<&ComputedPropertyData>

Get computed property name data

Source

pub const fn len(&self) -> usize

Number of nodes in the arena

Source

pub const fn is_empty(&self) -> bool

Check if arena is empty

Source§

impl NodeArena

Source

pub fn get_identifier_at(&self, index: NodeIndex) -> Option<&IdentifierData>

Source

pub fn get_literal_at(&self, index: NodeIndex) -> Option<&LiteralData>

Source

pub fn get_binary_expr_at(&self, index: NodeIndex) -> Option<&BinaryExprData>

Source

pub fn get_call_expr_at(&self, index: NodeIndex) -> Option<&CallExprData>

Source

pub fn get_access_expr_at(&self, index: NodeIndex) -> Option<&AccessExprData>

Source

pub fn get_conditional_expr_at( &self, index: NodeIndex, ) -> Option<&ConditionalExprData>

Source

pub fn get_qualified_name_at( &self, index: NodeIndex, ) -> Option<&QualifiedNameData>

Source

pub fn get_literal_expr_at(&self, index: NodeIndex) -> Option<&LiteralExprData>

Source

pub fn get_property_assignment_at( &self, index: NodeIndex, ) -> Option<&PropertyAssignmentData>

Source

pub fn get_type_assertion_at( &self, index: NodeIndex, ) -> Option<&TypeAssertionData>

Source

pub fn get_unary_expr_at(&self, index: NodeIndex) -> Option<&UnaryExprData>

Source

pub fn get_unary_expr_ex_at(&self, index: NodeIndex) -> Option<&UnaryExprDataEx>

Source

pub fn get_function_at(&self, index: NodeIndex) -> Option<&FunctionData>

Source

pub fn get_class_at(&self, index: NodeIndex) -> Option<&ClassData>

Source

pub fn get_block_at(&self, index: NodeIndex) -> Option<&BlockData>

Source

pub fn get_source_file_at(&self, index: NodeIndex) -> Option<&SourceFileData>

Source

pub fn get_variable_at(&self, index: NodeIndex) -> Option<&VariableData>

Source

pub fn get_variable_declaration_at( &self, index: NodeIndex, ) -> Option<&VariableDeclarationData>

Source

pub fn get_interface_at(&self, index: NodeIndex) -> Option<&InterfaceData>

Source

pub fn get_type_alias_at(&self, index: NodeIndex) -> Option<&TypeAliasData>

Source

pub fn get_enum_at(&self, index: NodeIndex) -> Option<&EnumData>

Source

pub fn get_enum_member_at(&self, index: NodeIndex) -> Option<&EnumMemberData>

Source

pub fn get_module_at(&self, index: NodeIndex) -> Option<&ModuleData>

Source

pub fn get_module_block_at(&self, index: NodeIndex) -> Option<&ModuleBlockData>

Source

pub fn get_if_statement_at(&self, index: NodeIndex) -> Option<&IfStatementData>

Source

pub fn get_loop_at(&self, index: NodeIndex) -> Option<&LoopData>

Source

pub fn get_for_in_of_at(&self, index: NodeIndex) -> Option<&ForInOfData>

Source

pub fn get_switch_at(&self, index: NodeIndex) -> Option<&SwitchData>

Source

pub fn get_case_clause_at(&self, index: NodeIndex) -> Option<&CaseClauseData>

Source

pub fn get_try_at(&self, index: NodeIndex) -> Option<&TryData>

Source

pub fn get_catch_clause_at(&self, index: NodeIndex) -> Option<&CatchClauseData>

Source

pub fn get_labeled_statement_at(&self, index: NodeIndex) -> Option<&LabeledData>

Source

pub fn get_jump_data_at(&self, index: NodeIndex) -> Option<&JumpData>

Source

pub fn get_with_statement_at( &self, index: NodeIndex, ) -> Option<&IfStatementData>

Source

pub fn get_import_decl_at(&self, index: NodeIndex) -> Option<&ImportDeclData>

Source

pub fn get_import_clause_at( &self, index: NodeIndex, ) -> Option<&ImportClauseData>

Source

pub fn get_named_imports_at( &self, index: NodeIndex, ) -> Option<&NamedImportsData>

Source

pub fn get_specifier_at(&self, index: NodeIndex) -> Option<&SpecifierData>

Source

pub fn get_export_decl_at(&self, index: NodeIndex) -> Option<&ExportDeclData>

Source

pub fn get_export_assignment_at( &self, index: NodeIndex, ) -> Option<&ExportAssignmentData>

Source

pub fn get_parameter_at(&self, index: NodeIndex) -> Option<&ParameterData>

Source

pub fn get_property_decl_at( &self, index: NodeIndex, ) -> Option<&PropertyDeclData>

Source

pub fn get_method_decl_at(&self, index: NodeIndex) -> Option<&MethodDeclData>

Source

pub fn get_constructor_at(&self, index: NodeIndex) -> Option<&ConstructorData>

Source

pub fn get_accessor_at(&self, index: NodeIndex) -> Option<&AccessorData>

Source

pub fn get_decorator_at(&self, index: NodeIndex) -> Option<&DecoratorData>

Source

pub fn get_type_ref_at(&self, index: NodeIndex) -> Option<&TypeRefData>

Source

pub fn get_expression_statement_at( &self, index: NodeIndex, ) -> Option<&ExprStatementData>

Source

pub fn get_return_statement_at(&self, index: NodeIndex) -> Option<&ReturnData>

Source

pub fn get_jsx_element_at(&self, index: NodeIndex) -> Option<&JsxElementData>

Source

pub fn get_jsx_opening_at(&self, index: NodeIndex) -> Option<&JsxOpeningData>

Source

pub fn get_jsx_closing_at(&self, index: NodeIndex) -> Option<&JsxClosingData>

Source

pub fn get_jsx_fragment_at(&self, index: NodeIndex) -> Option<&JsxFragmentData>

Source

pub fn get_jsx_attributes_at( &self, index: NodeIndex, ) -> Option<&JsxAttributesData>

Source

pub fn get_jsx_attribute_at( &self, index: NodeIndex, ) -> Option<&JsxAttributeData>

Source

pub fn get_jsx_spread_attribute_at( &self, index: NodeIndex, ) -> Option<&JsxSpreadAttributeData>

Source

pub fn get_jsx_expression_at( &self, index: NodeIndex, ) -> Option<&JsxExpressionData>

Source

pub fn get_jsx_text_at(&self, index: NodeIndex) -> Option<&JsxTextData>

Source

pub fn get_jsx_namespaced_name_at( &self, index: NodeIndex, ) -> Option<&JsxNamespacedNameData>

Source

pub fn get_signature_at(&self, index: NodeIndex) -> Option<&SignatureData>

Source

pub fn get_index_signature_at( &self, index: NodeIndex, ) -> Option<&IndexSignatureData>

Source

pub fn get_heritage_clause_at(&self, index: NodeIndex) -> Option<&HeritageData>

Source

pub fn get_composite_type_at( &self, index: NodeIndex, ) -> Option<&CompositeTypeData>

Source

pub fn get_array_type_at(&self, index: NodeIndex) -> Option<&ArrayTypeData>

Source

pub fn get_tuple_type_at(&self, index: NodeIndex) -> Option<&TupleTypeData>

Source

pub fn get_function_type_at( &self, index: NodeIndex, ) -> Option<&FunctionTypeData>

Source

pub fn get_type_literal_at(&self, index: NodeIndex) -> Option<&TypeLiteralData>

Source

pub fn get_conditional_type_at( &self, index: NodeIndex, ) -> Option<&ConditionalTypeData>

Source

pub fn get_mapped_type_at(&self, index: NodeIndex) -> Option<&MappedTypeData>

Source

pub fn get_indexed_access_type_at( &self, index: NodeIndex, ) -> Option<&IndexedAccessTypeData>

Source

pub fn get_literal_type_at(&self, index: NodeIndex) -> Option<&LiteralTypeData>

Source

pub fn get_wrapped_type_at(&self, index: NodeIndex) -> Option<&WrappedTypeData>

Source

pub fn get_expr_type_args_at( &self, index: NodeIndex, ) -> Option<&ExprWithTypeArgsData>

Source

pub fn get_type_query_at(&self, index: NodeIndex) -> Option<&TypeQueryData>

Source

pub fn get_type_operator_at( &self, index: NodeIndex, ) -> Option<&TypeOperatorData>

Source

pub fn get_infer_type_at(&self, index: NodeIndex) -> Option<&InferTypeData>

Source

pub fn get_template_literal_type_at( &self, index: NodeIndex, ) -> Option<&TemplateLiteralTypeData>

Source

pub fn get_named_tuple_member_at( &self, index: NodeIndex, ) -> Option<&NamedTupleMemberData>

Source

pub fn get_type_predicate_at( &self, index: NodeIndex, ) -> Option<&TypePredicateData>

Source

pub fn get_type_parameter_at( &self, index: NodeIndex, ) -> Option<&TypeParameterData>

Source

pub fn get_parenthesized_at( &self, index: NodeIndex, ) -> Option<&ParenthesizedData>

Source

pub fn get_template_expr_at( &self, index: NodeIndex, ) -> Option<&TemplateExprData>

Source

pub fn get_template_span_at( &self, index: NodeIndex, ) -> Option<&TemplateSpanData>

Source

pub fn get_tagged_template_at( &self, index: NodeIndex, ) -> Option<&TaggedTemplateData>

Source

pub fn get_spread_at(&self, index: NodeIndex) -> Option<&SpreadData>

Source

pub fn get_shorthand_property_at( &self, index: NodeIndex, ) -> Option<&ShorthandPropertyData>

Source

pub fn get_binding_pattern_at( &self, index: NodeIndex, ) -> Option<&BindingPatternData>

Source

pub fn get_binding_element_at( &self, index: NodeIndex, ) -> Option<&BindingElementData>

Source

pub fn get_computed_property_at( &self, index: NodeIndex, ) -> Option<&ComputedPropertyData>

Source§

impl NodeArena

Source

pub fn new() -> Self

Source

pub fn set_interner(&mut self, interner: Interner)

Set the interner (called after parsing to transfer ownership from scanner)

Source

pub const fn interner(&self) -> &Interner

Get a reference to the interner

Source

pub fn resolve_identifier_text<'a>( &'a self, data: &'a IdentifierData, ) -> &'a str

Resolve an identifier text using Atom (fast) or escaped_text (fallback).

Source

pub fn with_capacity(capacity: usize) -> Self

Create an arena with pre-allocated capacity. Uses heuristic ratios based on typical TypeScript AST composition.

Source

pub fn clear(&mut self)

Source

pub fn add_token(&mut self, kind: u16, pos: u32, end: u32) -> NodeIndex

Add a token node (no additional data)

Source

pub fn create_modifier(&mut self, kind: SyntaxKind, pos: u32) -> NodeIndex

Create a modifier token (static, public, private, etc.)

Source

pub fn add_identifier( &mut self, kind: u16, pos: u32, end: u32, data: IdentifierData, ) -> NodeIndex

Add an identifier node

Source

pub fn add_literal( &mut self, kind: u16, pos: u32, end: u32, data: LiteralData, ) -> NodeIndex

Add a literal node

Source

pub fn add_binary_expr( &mut self, kind: u16, pos: u32, end: u32, data: BinaryExprData, ) -> NodeIndex

Add a binary expression

Source

pub fn add_call_expr( &mut self, kind: u16, pos: u32, end: u32, data: CallExprData, ) -> NodeIndex

Add a call expression

Source

pub fn add_function( &mut self, kind: u16, pos: u32, end: u32, data: FunctionData, ) -> NodeIndex

Add a function node

Source

pub fn add_class( &mut self, kind: u16, pos: u32, end: u32, data: ClassData, ) -> NodeIndex

Add a class node

Source

pub fn add_block( &mut self, kind: u16, pos: u32, end: u32, data: BlockData, ) -> NodeIndex

Add a block node

Source

pub fn add_source_file( &mut self, pos: u32, end: u32, data: SourceFileData, ) -> NodeIndex

Add a source file node

Source

pub fn add_qualified_name( &mut self, kind: u16, pos: u32, end: u32, data: QualifiedNameData, ) -> NodeIndex

Add a qualified name node

Source

pub fn add_computed_property( &mut self, kind: u16, pos: u32, end: u32, data: ComputedPropertyData, ) -> NodeIndex

Add a computed property name node

Source

pub fn add_unary_expr( &mut self, kind: u16, pos: u32, end: u32, data: UnaryExprData, ) -> NodeIndex

Add a unary expression node

Source

pub fn add_access_expr( &mut self, kind: u16, pos: u32, end: u32, data: AccessExprData, ) -> NodeIndex

Add a property/element access expression node

Source

pub fn add_conditional_expr( &mut self, kind: u16, pos: u32, end: u32, data: ConditionalExprData, ) -> NodeIndex

Add a conditional expression node (a ? b : c)

Source

pub fn add_literal_expr( &mut self, kind: u16, pos: u32, end: u32, data: LiteralExprData, ) -> NodeIndex

Add an object/array literal expression node

Source

pub fn add_parenthesized( &mut self, kind: u16, pos: u32, end: u32, data: ParenthesizedData, ) -> NodeIndex

Add a parenthesized expression node

Source

pub fn add_unary_expr_ex( &mut self, kind: u16, pos: u32, end: u32, data: UnaryExprDataEx, ) -> NodeIndex

Add a spread/await/yield expression node

Source

pub fn add_type_assertion( &mut self, kind: u16, pos: u32, end: u32, data: TypeAssertionData, ) -> NodeIndex

Add a type assertion expression node

Source

pub fn add_template_expr( &mut self, kind: u16, pos: u32, end: u32, data: TemplateExprData, ) -> NodeIndex

Add a template expression node

Source

pub fn add_template_span( &mut self, kind: u16, pos: u32, end: u32, data: TemplateSpanData, ) -> NodeIndex

Add a template span node

Source

pub fn add_tagged_template( &mut self, kind: u16, pos: u32, end: u32, data: TaggedTemplateData, ) -> NodeIndex

Add a tagged template expression node

Source

pub fn add_interface( &mut self, kind: u16, pos: u32, end: u32, data: InterfaceData, ) -> NodeIndex

Add an interface declaration node

Source

pub fn add_type_alias( &mut self, kind: u16, pos: u32, end: u32, data: TypeAliasData, ) -> NodeIndex

Add a type alias declaration node

Source

pub fn add_enum( &mut self, kind: u16, pos: u32, end: u32, data: EnumData, ) -> NodeIndex

Add an enum declaration node

Source

pub fn add_enum_member( &mut self, kind: u16, pos: u32, end: u32, data: EnumMemberData, ) -> NodeIndex

Add an enum member node

Source

pub fn add_module( &mut self, kind: u16, pos: u32, end: u32, data: ModuleData, ) -> NodeIndex

Add a module declaration node

Source

pub fn add_module_block( &mut self, kind: u16, pos: u32, end: u32, data: ModuleBlockData, ) -> NodeIndex

Add a module block node: { statements }

Source

pub fn add_signature( &mut self, kind: u16, pos: u32, end: u32, data: SignatureData, ) -> NodeIndex

Add a signature node (property/method signature)

Source

pub fn add_index_signature( &mut self, kind: u16, pos: u32, end: u32, data: IndexSignatureData, ) -> NodeIndex

Add an index signature node

Source

pub fn add_property_decl( &mut self, kind: u16, pos: u32, end: u32, data: PropertyDeclData, ) -> NodeIndex

Add a property declaration node

Source

pub fn add_method_decl( &mut self, kind: u16, pos: u32, end: u32, data: MethodDeclData, ) -> NodeIndex

Add a method declaration node

Source

pub fn add_constructor( &mut self, kind: u16, pos: u32, end: u32, data: ConstructorData, ) -> NodeIndex

Add a constructor declaration node

Source

pub fn add_accessor( &mut self, kind: u16, pos: u32, end: u32, data: AccessorData, ) -> NodeIndex

Add an accessor declaration node (get/set)

Source

pub fn add_parameter( &mut self, kind: u16, pos: u32, end: u32, data: ParameterData, ) -> NodeIndex

Add a parameter declaration node

Source

pub fn add_type_parameter( &mut self, kind: u16, pos: u32, end: u32, data: TypeParameterData, ) -> NodeIndex

Add a type parameter declaration node

Source

pub fn add_decorator( &mut self, kind: u16, pos: u32, end: u32, data: DecoratorData, ) -> NodeIndex

Add a decorator node

Source

pub fn add_heritage( &mut self, kind: u16, pos: u32, end: u32, data: HeritageData, ) -> NodeIndex

Add a heritage clause node

Source

pub fn add_expr_with_type_args( &mut self, kind: u16, pos: u32, end: u32, data: ExprWithTypeArgsData, ) -> NodeIndex

Add an expression with type arguments node

Source

pub fn add_if_statement( &mut self, kind: u16, pos: u32, end: u32, data: IfStatementData, ) -> NodeIndex

Add an if statement node

Source

pub fn add_loop( &mut self, kind: u16, pos: u32, end: u32, data: LoopData, ) -> NodeIndex

Add a loop node (for/while/do)

Source

pub fn add_variable( &mut self, kind: u16, pos: u32, end: u32, data: VariableData, ) -> NodeIndex

Add a variable statement/declaration list node

Source

pub fn add_variable_with_flags( &mut self, kind: u16, pos: u32, end: u32, data: VariableData, flags: u16, ) -> NodeIndex

Add a variable statement/declaration list node with flags

Source

pub fn add_return( &mut self, kind: u16, pos: u32, end: u32, data: ReturnData, ) -> NodeIndex

Add a return/throw statement node

Source

pub fn add_expr_statement( &mut self, kind: u16, pos: u32, end: u32, data: ExprStatementData, ) -> NodeIndex

Add an expression statement node

Source

pub fn add_switch( &mut self, kind: u16, pos: u32, end: u32, data: SwitchData, ) -> NodeIndex

Add a switch statement node

Source

pub fn add_case_clause( &mut self, kind: u16, pos: u32, end: u32, data: CaseClauseData, ) -> NodeIndex

Add a case/default clause node

Source

pub fn add_try( &mut self, kind: u16, pos: u32, end: u32, data: TryData, ) -> NodeIndex

Add a try statement node

Source

pub fn add_catch_clause( &mut self, kind: u16, pos: u32, end: u32, data: CatchClauseData, ) -> NodeIndex

Add a catch clause node

Source

pub fn add_labeled( &mut self, kind: u16, pos: u32, end: u32, data: LabeledData, ) -> NodeIndex

Add a labeled statement node

Source

pub fn add_jump( &mut self, kind: u16, pos: u32, end: u32, data: JumpData, ) -> NodeIndex

Add a break/continue statement node

Source

pub fn add_with( &mut self, kind: u16, pos: u32, end: u32, data: WithData, ) -> NodeIndex

Add a with statement node

Source

pub fn add_type_ref( &mut self, kind: u16, pos: u32, end: u32, data: TypeRefData, ) -> NodeIndex

Add a type reference node

Source

pub fn add_composite_type( &mut self, kind: u16, pos: u32, end: u32, data: CompositeTypeData, ) -> NodeIndex

Add a union/intersection type node

Source

pub fn add_function_type( &mut self, kind: u16, pos: u32, end: u32, data: FunctionTypeData, ) -> NodeIndex

Add a function/constructor type node

Source

pub fn add_type_query( &mut self, kind: u16, pos: u32, end: u32, data: TypeQueryData, ) -> NodeIndex

Add a type query node (typeof)

Source

pub fn add_type_literal( &mut self, kind: u16, pos: u32, end: u32, data: TypeLiteralData, ) -> NodeIndex

Add a type literal node

Source

pub fn add_array_type( &mut self, kind: u16, pos: u32, end: u32, data: ArrayTypeData, ) -> NodeIndex

Add an array type node

Source

pub fn add_tuple_type( &mut self, kind: u16, pos: u32, end: u32, data: TupleTypeData, ) -> NodeIndex

Add a tuple type node

Source

pub fn add_wrapped_type( &mut self, kind: u16, pos: u32, end: u32, data: WrappedTypeData, ) -> NodeIndex

Add an optional/rest type node

Source

pub fn add_conditional_type( &mut self, kind: u16, pos: u32, end: u32, data: ConditionalTypeData, ) -> NodeIndex

Add a conditional type node

Source

pub fn add_infer_type( &mut self, kind: u16, pos: u32, end: u32, data: InferTypeData, ) -> NodeIndex

Add an infer type node

Source

pub fn add_type_operator( &mut self, kind: u16, pos: u32, end: u32, data: TypeOperatorData, ) -> NodeIndex

Add a type operator node (keyof, unique, readonly)

Source

pub fn add_indexed_access_type( &mut self, kind: u16, pos: u32, end: u32, data: IndexedAccessTypeData, ) -> NodeIndex

Add an indexed access type node

Source

pub fn add_mapped_type( &mut self, kind: u16, pos: u32, end: u32, data: MappedTypeData, ) -> NodeIndex

Add a mapped type node

Source

pub fn add_literal_type( &mut self, kind: u16, pos: u32, end: u32, data: LiteralTypeData, ) -> NodeIndex

Add a literal type node

Source

pub fn add_template_literal_type( &mut self, kind: u16, pos: u32, end: u32, data: TemplateLiteralTypeData, ) -> NodeIndex

Add a template literal type node

Source

pub fn add_named_tuple_member( &mut self, kind: u16, pos: u32, end: u32, data: NamedTupleMemberData, ) -> NodeIndex

Add a named tuple member node

Source

pub fn add_type_predicate( &mut self, kind: u16, pos: u32, end: u32, data: TypePredicateData, ) -> NodeIndex

Add a type predicate node

Source

pub fn add_import_decl( &mut self, kind: u16, pos: u32, end: u32, data: ImportDeclData, ) -> NodeIndex

Add an import declaration node

Source

pub fn add_import_clause( &mut self, kind: u16, pos: u32, end: u32, data: ImportClauseData, ) -> NodeIndex

Add an import clause node

Source

pub fn add_named_imports( &mut self, kind: u16, pos: u32, end: u32, data: NamedImportsData, ) -> NodeIndex

Add a namespace/named imports node

Source

pub fn add_specifier( &mut self, kind: u16, pos: u32, end: u32, data: SpecifierData, ) -> NodeIndex

Add an import/export specifier node

Source

pub fn add_export_decl( &mut self, kind: u16, pos: u32, end: u32, data: ExportDeclData, ) -> NodeIndex

Add an export declaration node

Source

pub fn add_export_assignment( &mut self, kind: u16, pos: u32, end: u32, data: ExportAssignmentData, ) -> NodeIndex

Add an export assignment node

Source

pub fn add_import_attributes( &mut self, kind: u16, pos: u32, end: u32, data: ImportAttributesData, ) -> NodeIndex

Add an import attributes node

Source

pub fn add_import_attribute( &mut self, kind: u16, pos: u32, end: u32, data: ImportAttributeData, ) -> NodeIndex

Add an import attribute node

Source

pub fn add_binding_pattern( &mut self, kind: u16, pos: u32, end: u32, data: BindingPatternData, ) -> NodeIndex

Add a binding pattern node

Source

pub fn add_binding_element( &mut self, kind: u16, pos: u32, end: u32, data: BindingElementData, ) -> NodeIndex

Add a binding element node

Source

pub fn add_property_assignment( &mut self, kind: u16, pos: u32, end: u32, data: PropertyAssignmentData, ) -> NodeIndex

Add a property assignment node

Source

pub fn add_shorthand_property( &mut self, kind: u16, pos: u32, end: u32, data: ShorthandPropertyData, ) -> NodeIndex

Add a shorthand property assignment node

Source

pub fn add_spread( &mut self, kind: u16, pos: u32, end: u32, data: SpreadData, ) -> NodeIndex

Add a spread assignment node

Source

pub fn add_jsx_element( &mut self, kind: u16, pos: u32, end: u32, data: JsxElementData, ) -> NodeIndex

Add a JSX element node

Source

pub fn add_jsx_opening( &mut self, kind: u16, pos: u32, end: u32, data: JsxOpeningData, ) -> NodeIndex

Add a JSX opening/self-closing element node

Source

pub fn add_jsx_closing( &mut self, kind: u16, pos: u32, end: u32, data: JsxClosingData, ) -> NodeIndex

Add a JSX closing element node

Source

pub fn add_jsx_fragment( &mut self, kind: u16, pos: u32, end: u32, data: JsxFragmentData, ) -> NodeIndex

Add a JSX fragment node

Source

pub fn add_jsx_attributes( &mut self, kind: u16, pos: u32, end: u32, data: JsxAttributesData, ) -> NodeIndex

Add a JSX attributes node

Source

pub fn add_jsx_attribute( &mut self, kind: u16, pos: u32, end: u32, data: JsxAttributeData, ) -> NodeIndex

Add a JSX attribute node

Source

pub fn add_jsx_spread_attribute( &mut self, kind: u16, pos: u32, end: u32, data: JsxSpreadAttributeData, ) -> NodeIndex

Add a JSX spread attribute node

Source

pub fn add_jsx_expression( &mut self, kind: u16, pos: u32, end: u32, data: JsxExpressionData, ) -> NodeIndex

Add a JSX expression node

Source

pub fn add_jsx_text( &mut self, kind: u16, pos: u32, end: u32, data: JsxTextData, ) -> NodeIndex

Add a JSX text node

Source

pub fn add_jsx_namespaced_name( &mut self, kind: u16, pos: u32, end: u32, data: JsxNamespacedNameData, ) -> NodeIndex

Add a JSX namespaced name node

Source

pub fn add_variable_declaration( &mut self, kind: u16, pos: u32, end: u32, data: VariableDeclarationData, ) -> NodeIndex

Add a variable declaration node (individual)

Source

pub fn add_for_in_of( &mut self, kind: u16, pos: u32, end: u32, data: ForInOfData, ) -> NodeIndex

Add a for-in/for-of statement node

Trait Implementations§

Source§

impl Clone for NodeArena

Source§

fn clone(&self) -> NodeArena

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeArena

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NodeArena

Source§

fn default() -> NodeArena

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for NodeArena

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl NodeAccess for NodeArena

Implementation of NodeAccess for NodeArena

Source§

fn node_info(&self, index: NodeIndex) -> Option<NodeInfo>

Get basic node information by index
Source§

fn kind(&self, index: NodeIndex) -> Option<u16>

Get the syntax kind of a node
Source§

fn pos_end(&self, index: NodeIndex) -> Option<(u32, u32)>

Get the source position range
Source§

fn get_identifier_text(&self, index: NodeIndex) -> Option<&str>

Get identifier text (if this is an identifier node)
Source§

fn get_literal_text(&self, index: NodeIndex) -> Option<&str>

Get literal value text (if this is a literal node)
Source§

fn get_children(&self, index: NodeIndex) -> Vec<NodeIndex>

Get children of a node (for traversal)
Source§

fn exists(&self, index: NodeIndex) -> bool

Check if a node exists
Source§

impl Serialize for NodeArena

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,