Struct i_slint_compiler::parser::SyntaxNode
source · [−]pub struct SyntaxNode {
pub node: SyntaxNode<Language>,
pub source_file: SourceFile,
}
Fields
node: SyntaxNode<Language>
source_file: SourceFile
Implementations
sourceimpl SyntaxNode
impl SyntaxNode
pub fn child_node(&self, kind: SyntaxKind) -> Option<SyntaxNode>
pub fn child_token(&self, kind: SyntaxKind) -> Option<SyntaxToken>
pub fn child_text(&self, kind: SyntaxKind) -> Option<String>
pub fn kind(&self) -> SyntaxKind
pub fn children(&self) -> impl Iterator<Item = SyntaxNode>
pub fn children_with_tokens(&self) -> impl Iterator<Item = NodeOrToken>
pub fn text(&self) -> SyntaxText
pub fn parent(&self) -> Option<SyntaxNode>
pub fn first_token(&self) -> Option<SyntaxToken>
Methods from Deref<Target = SyntaxNode<Language>>
sourcepub fn replace_with(&self, replacement: GreenNode) -> GreenNode
pub fn replace_with(&self, replacement: GreenNode) -> GreenNode
Returns a green tree, equal to the green tree this node belongs two, except with this node substitute. The complexity of operation is proportional to the depth of the tree
pub fn kind(&self) -> <L as Language>::Kind
pub fn text_range(&self) -> TextRange
pub fn index(&self) -> usize
pub fn text(&self) -> SyntaxText
pub fn green(&self) -> Cow<'_, GreenNodeData>
pub fn parent(&self) -> Option<SyntaxNode<L>>
pub fn ancestors(&self) -> impl Iterator<Item = SyntaxNode<L>>
pub fn children(&self) -> SyntaxNodeChildren<L>
pub fn children_with_tokens(&self) -> SyntaxElementChildren<L>
pub fn first_child(&self) -> Option<SyntaxNode<L>>
pub fn last_child(&self) -> Option<SyntaxNode<L>>
pub fn first_child_or_token(
&self
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
pub fn last_child_or_token(
&self
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
pub fn next_sibling(&self) -> Option<SyntaxNode<L>>
pub fn prev_sibling(&self) -> Option<SyntaxNode<L>>
pub fn next_sibling_or_token(
&self
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
pub fn prev_sibling_or_token(
&self
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
sourcepub fn first_token(&self) -> Option<SyntaxToken<L>>
pub fn first_token(&self) -> Option<SyntaxToken<L>>
Return the leftmost token in the subtree of this node.
sourcepub fn last_token(&self) -> Option<SyntaxToken<L>>
pub fn last_token(&self) -> Option<SyntaxToken<L>>
Return the rightmost token in the subtree of this node.
pub fn siblings(
&self,
direction: Direction
) -> impl Iterator<Item = SyntaxNode<L>>
pub fn siblings_with_tokens(
&self,
direction: Direction
) -> impl Iterator<Item = NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
pub fn descendants(&self) -> impl Iterator<Item = SyntaxNode<L>>
pub fn descendants_with_tokens(
&self
) -> impl Iterator<Item = NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
sourcepub fn preorder(&self) -> Preorder<L>
pub fn preorder(&self) -> Preorder<L>
Traverse the subtree rooted at the current node (including the current node) in preorder, excluding tokens.
sourcepub fn preorder_with_tokens(&self) -> PreorderWithTokens<L>
pub fn preorder_with_tokens(&self) -> PreorderWithTokens<L>
Traverse the subtree rooted at the current node (including the current node) in preorder, including tokens.
sourcepub fn token_at_offset(&self, offset: TextSize) -> TokenAtOffset<SyntaxToken<L>>
pub fn token_at_offset(&self, offset: TextSize) -> TokenAtOffset<SyntaxToken<L>>
Find a token in the subtree corresponding to this node, which covers the offset. Precondition: offset must be withing node’s range.
sourcepub fn covering_element(
&self,
range: TextRange
) -> NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>
pub fn covering_element(
&self,
range: TextRange
) -> NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>
Return the deepest node or token in the current subtree that fully contains the range. If the range is empty and is contained in two leaf nodes, either one can be returned. Precondition: range must be contained withing the current node
sourcepub fn child_or_token_at_range(
&self,
range: TextRange
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
pub fn child_or_token_at_range(
&self,
range: TextRange
) -> Option<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>>
Finds a SyntaxElement
which intersects with a given range
. If
there are several intersecting elements, any one can be returned.
The method uses binary search internally, so it’s complexity is
O(log(N))
where N = self.children_with_tokens().count()
.
sourcepub fn clone_subtree(&self) -> SyntaxNode<L>
pub fn clone_subtree(&self) -> SyntaxNode<L>
Returns an independent copy of the subtree rooted at this node.
The parent of the returned node will be None
, the start offset will be
zero, but, otherwise, it’ll be equivalent to the source node.
pub fn clone_for_update(&self) -> SyntaxNode<L>
pub fn detach(&self)
pub fn splice_children(
&self,
to_delete: Range<usize>,
to_insert: Vec<NodeOrToken<SyntaxNode<L>, SyntaxToken<L>>, Global>
)
Trait Implementations
sourceimpl Clone for SyntaxNode
impl Clone for SyntaxNode
sourcefn clone(&self) -> SyntaxNode
fn clone(&self) -> SyntaxNode
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SyntaxNode
impl Debug for SyntaxNode
sourceimpl Deref for SyntaxNode
impl Deref for SyntaxNode
sourceimpl From<ArrayType> for SyntaxNode
impl From<ArrayType> for SyntaxNode
sourceimpl From<AtImageUrl> for SyntaxNode
impl From<AtImageUrl> for SyntaxNode
sourcefn from(original: AtImageUrl) -> Self
fn from(original: AtImageUrl) -> Self
Performs the conversion.
sourceimpl From<AtLinearGradient> for SyntaxNode
impl From<AtLinearGradient> for SyntaxNode
sourcefn from(original: AtLinearGradient) -> Self
fn from(original: AtLinearGradient) -> Self
Performs the conversion.
sourceimpl From<BinaryExpression> for SyntaxNode
impl From<BinaryExpression> for SyntaxNode
sourcefn from(original: BinaryExpression) -> Self
fn from(original: BinaryExpression) -> Self
Performs the conversion.
sourceimpl From<Binding> for SyntaxNode
impl From<Binding> for SyntaxNode
sourceimpl From<BindingExpression> for SyntaxNode
impl From<BindingExpression> for SyntaxNode
sourcefn from(original: BindingExpression) -> Self
fn from(original: BindingExpression) -> Self
Performs the conversion.
sourceimpl From<CallbackConnection> for SyntaxNode
impl From<CallbackConnection> for SyntaxNode
sourcefn from(original: CallbackConnection) -> Self
fn from(original: CallbackConnection) -> Self
Performs the conversion.
sourceimpl From<CallbackDeclaration> for SyntaxNode
impl From<CallbackDeclaration> for SyntaxNode
sourcefn from(original: CallbackDeclaration) -> Self
fn from(original: CallbackDeclaration) -> Self
Performs the conversion.
sourceimpl From<ChildrenPlaceholder> for SyntaxNode
impl From<ChildrenPlaceholder> for SyntaxNode
sourcefn from(original: ChildrenPlaceholder) -> Self
fn from(original: ChildrenPlaceholder) -> Self
Performs the conversion.
sourceimpl From<CodeBlock> for SyntaxNode
impl From<CodeBlock> for SyntaxNode
sourceimpl From<Component> for SyntaxNode
impl From<Component> for SyntaxNode
sourceimpl From<ConditionalElement> for SyntaxNode
impl From<ConditionalElement> for SyntaxNode
sourcefn from(original: ConditionalElement) -> Self
fn from(original: ConditionalElement) -> Self
Performs the conversion.
sourceimpl From<ConditionalExpression> for SyntaxNode
impl From<ConditionalExpression> for SyntaxNode
sourcefn from(original: ConditionalExpression) -> Self
fn from(original: ConditionalExpression) -> Self
Performs the conversion.
sourceimpl From<DeclaredIdentifier> for SyntaxNode
impl From<DeclaredIdentifier> for SyntaxNode
sourcefn from(original: DeclaredIdentifier) -> Self
fn from(original: DeclaredIdentifier) -> Self
Performs the conversion.
sourceimpl From<Document> for SyntaxNode
impl From<Document> for SyntaxNode
sourceimpl From<Element> for SyntaxNode
impl From<Element> for SyntaxNode
sourceimpl From<ExportIdentifier> for SyntaxNode
impl From<ExportIdentifier> for SyntaxNode
sourcefn from(original: ExportIdentifier) -> Self
fn from(original: ExportIdentifier) -> Self
Performs the conversion.
sourceimpl From<ExportName> for SyntaxNode
impl From<ExportName> for SyntaxNode
sourcefn from(original: ExportName) -> Self
fn from(original: ExportName) -> Self
Performs the conversion.
sourceimpl From<ExportSpecifier> for SyntaxNode
impl From<ExportSpecifier> for SyntaxNode
sourcefn from(original: ExportSpecifier) -> Self
fn from(original: ExportSpecifier) -> Self
Performs the conversion.
sourceimpl From<ExportsList> for SyntaxNode
impl From<ExportsList> for SyntaxNode
sourcefn from(original: ExportsList) -> Self
fn from(original: ExportsList) -> Self
Performs the conversion.
sourceimpl From<Expression> for SyntaxNode
impl From<Expression> for SyntaxNode
sourcefn from(original: Expression) -> Self
fn from(original: Expression) -> Self
Performs the conversion.
sourceimpl From<ExternalName> for SyntaxNode
impl From<ExternalName> for SyntaxNode
sourcefn from(original: ExternalName) -> Self
fn from(original: ExternalName) -> Self
Performs the conversion.
sourceimpl From<FunctionCallExpression> for SyntaxNode
impl From<FunctionCallExpression> for SyntaxNode
sourcefn from(original: FunctionCallExpression) -> Self
fn from(original: FunctionCallExpression) -> Self
Performs the conversion.
sourceimpl From<ImportIdentifier> for SyntaxNode
impl From<ImportIdentifier> for SyntaxNode
sourcefn from(original: ImportIdentifier) -> Self
fn from(original: ImportIdentifier) -> Self
Performs the conversion.
sourceimpl From<ImportIdentifierList> for SyntaxNode
impl From<ImportIdentifierList> for SyntaxNode
sourcefn from(original: ImportIdentifierList) -> Self
fn from(original: ImportIdentifierList) -> Self
Performs the conversion.
sourceimpl From<ImportSpecifier> for SyntaxNode
impl From<ImportSpecifier> for SyntaxNode
sourcefn from(original: ImportSpecifier) -> Self
fn from(original: ImportSpecifier) -> Self
Performs the conversion.
sourceimpl From<IndexExpression> for SyntaxNode
impl From<IndexExpression> for SyntaxNode
sourcefn from(original: IndexExpression) -> Self
fn from(original: IndexExpression) -> Self
Performs the conversion.
sourceimpl From<InternalName> for SyntaxNode
impl From<InternalName> for SyntaxNode
sourcefn from(original: InternalName) -> Self
fn from(original: InternalName) -> Self
Performs the conversion.
sourceimpl From<MemberAccess> for SyntaxNode
impl From<MemberAccess> for SyntaxNode
sourcefn from(original: MemberAccess) -> Self
fn from(original: MemberAccess) -> Self
Performs the conversion.
sourceimpl From<ObjectLiteral> for SyntaxNode
impl From<ObjectLiteral> for SyntaxNode
sourcefn from(original: ObjectLiteral) -> Self
fn from(original: ObjectLiteral) -> Self
Performs the conversion.
sourceimpl From<ObjectMember> for SyntaxNode
impl From<ObjectMember> for SyntaxNode
sourcefn from(original: ObjectMember) -> Self
fn from(original: ObjectMember) -> Self
Performs the conversion.
sourceimpl From<ObjectType> for SyntaxNode
impl From<ObjectType> for SyntaxNode
sourcefn from(original: ObjectType) -> Self
fn from(original: ObjectType) -> Self
Performs the conversion.
sourceimpl From<ObjectTypeMember> for SyntaxNode
impl From<ObjectTypeMember> for SyntaxNode
sourcefn from(original: ObjectTypeMember) -> Self
fn from(original: ObjectTypeMember) -> Self
Performs the conversion.
sourceimpl From<PropertyAnimation> for SyntaxNode
impl From<PropertyAnimation> for SyntaxNode
sourcefn from(original: PropertyAnimation) -> Self
fn from(original: PropertyAnimation) -> Self
Performs the conversion.
sourceimpl From<PropertyDeclaration> for SyntaxNode
impl From<PropertyDeclaration> for SyntaxNode
sourcefn from(original: PropertyDeclaration) -> Self
fn from(original: PropertyDeclaration) -> Self
Performs the conversion.
sourceimpl From<QualifiedName> for SyntaxNode
impl From<QualifiedName> for SyntaxNode
sourcefn from(original: QualifiedName) -> Self
fn from(original: QualifiedName) -> Self
Performs the conversion.
sourceimpl From<RepeatedElement> for SyntaxNode
impl From<RepeatedElement> for SyntaxNode
sourcefn from(original: RepeatedElement) -> Self
fn from(original: RepeatedElement) -> Self
Performs the conversion.
sourceimpl From<RepeatedIndex> for SyntaxNode
impl From<RepeatedIndex> for SyntaxNode
sourcefn from(original: RepeatedIndex) -> Self
fn from(original: RepeatedIndex) -> Self
Performs the conversion.
sourceimpl From<ReturnStatement> for SyntaxNode
impl From<ReturnStatement> for SyntaxNode
sourcefn from(original: ReturnStatement) -> Self
fn from(original: ReturnStatement) -> Self
Performs the conversion.
sourceimpl From<ReturnType> for SyntaxNode
impl From<ReturnType> for SyntaxNode
sourcefn from(original: ReturnType) -> Self
fn from(original: ReturnType) -> Self
Performs the conversion.
sourceimpl From<SelfAssignment> for SyntaxNode
impl From<SelfAssignment> for SyntaxNode
sourcefn from(original: SelfAssignment) -> Self
fn from(original: SelfAssignment) -> Self
Performs the conversion.
sourceimpl From<StatePropertyChange> for SyntaxNode
impl From<StatePropertyChange> for SyntaxNode
sourcefn from(original: StatePropertyChange) -> Self
fn from(original: StatePropertyChange) -> Self
Performs the conversion.
sourceimpl From<States> for SyntaxNode
impl From<States> for SyntaxNode
sourceimpl From<StringTemplate> for SyntaxNode
impl From<StringTemplate> for SyntaxNode
sourcefn from(original: StringTemplate) -> Self
fn from(original: StringTemplate) -> Self
Performs the conversion.
sourceimpl From<StructDeclaration> for SyntaxNode
impl From<StructDeclaration> for SyntaxNode
sourcefn from(original: StructDeclaration) -> Self
fn from(original: StructDeclaration) -> Self
Performs the conversion.
sourceimpl From<SubElement> for SyntaxNode
impl From<SubElement> for SyntaxNode
sourcefn from(original: SubElement) -> Self
fn from(original: SubElement) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for Document
impl From<SyntaxNode> for Document
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for Component
impl From<SyntaxNode> for Component
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for PropertyDeclaration
impl From<SyntaxNode> for PropertyDeclaration
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for PropertyAnimation
impl From<SyntaxNode> for PropertyAnimation
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for QualifiedName
impl From<SyntaxNode> for QualifiedName
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for DeclaredIdentifier
impl From<SyntaxNode> for DeclaredIdentifier
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ChildrenPlaceholder
impl From<SyntaxNode> for ChildrenPlaceholder
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for Binding
impl From<SyntaxNode> for Binding
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for TwoWayBinding
impl From<SyntaxNode> for TwoWayBinding
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for BindingExpression
impl From<SyntaxNode> for BindingExpression
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for CodeBlock
impl From<SyntaxNode> for CodeBlock
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ReturnStatement
impl From<SyntaxNode> for ReturnStatement
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for SubElement
impl From<SyntaxNode> for SubElement
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for Expression
impl From<SyntaxNode> for Expression
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for StringTemplate
impl From<SyntaxNode> for StringTemplate
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for AtImageUrl
impl From<SyntaxNode> for AtImageUrl
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for AtLinearGradient
impl From<SyntaxNode> for AtLinearGradient
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for FunctionCallExpression
impl From<SyntaxNode> for FunctionCallExpression
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for IndexExpression
impl From<SyntaxNode> for IndexExpression
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for SelfAssignment
impl From<SyntaxNode> for SelfAssignment
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ConditionalExpression
impl From<SyntaxNode> for ConditionalExpression
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for BinaryExpression
impl From<SyntaxNode> for BinaryExpression
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for UnaryOpExpression
impl From<SyntaxNode> for UnaryOpExpression
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for Element
impl From<SyntaxNode> for Element
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for MemberAccess
impl From<SyntaxNode> for MemberAccess
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for Array
impl From<SyntaxNode> for Array
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ObjectLiteral
impl From<SyntaxNode> for ObjectLiteral
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ObjectMember
impl From<SyntaxNode> for ObjectMember
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for States
impl From<SyntaxNode> for States
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for State
impl From<SyntaxNode> for State
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for StatePropertyChange
impl From<SyntaxNode> for StatePropertyChange
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for Transitions
impl From<SyntaxNode> for Transitions
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for Transition
impl From<SyntaxNode> for Transition
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ExportsList
impl From<SyntaxNode> for ExportsList
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for RepeatedElement
impl From<SyntaxNode> for RepeatedElement
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ExportSpecifier
impl From<SyntaxNode> for ExportSpecifier
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ExportIdentifier
impl From<SyntaxNode> for ExportIdentifier
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ExportName
impl From<SyntaxNode> for ExportName
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ImportSpecifier
impl From<SyntaxNode> for ImportSpecifier
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ImportIdentifierList
impl From<SyntaxNode> for ImportIdentifierList
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ImportIdentifier
impl From<SyntaxNode> for ImportIdentifier
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ExternalName
impl From<SyntaxNode> for ExternalName
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for InternalName
impl From<SyntaxNode> for InternalName
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for Type
impl From<SyntaxNode> for Type
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ObjectType
impl From<SyntaxNode> for ObjectType
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for RepeatedIndex
impl From<SyntaxNode> for RepeatedIndex
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ObjectTypeMember
impl From<SyntaxNode> for ObjectTypeMember
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ArrayType
impl From<SyntaxNode> for ArrayType
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for StructDeclaration
impl From<SyntaxNode> for StructDeclaration
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for NodeOrToken
impl From<SyntaxNode> for NodeOrToken
sourcefn from(original: SyntaxNode) -> NodeOrToken
fn from(original: SyntaxNode) -> NodeOrToken
Performs the conversion.
sourceimpl From<SyntaxNode> for ConditionalElement
impl From<SyntaxNode> for ConditionalElement
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for CallbackDeclaration
impl From<SyntaxNode> for CallbackDeclaration
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for ReturnType
impl From<SyntaxNode> for ReturnType
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<SyntaxNode> for CallbackConnection
impl From<SyntaxNode> for CallbackConnection
sourcefn from(node: SyntaxNode) -> Self
fn from(node: SyntaxNode) -> Self
Performs the conversion.
sourceimpl From<Transition> for SyntaxNode
impl From<Transition> for SyntaxNode
sourcefn from(original: Transition) -> Self
fn from(original: Transition) -> Self
Performs the conversion.
sourceimpl From<Transitions> for SyntaxNode
impl From<Transitions> for SyntaxNode
sourcefn from(original: Transitions) -> Self
fn from(original: Transitions) -> Self
Performs the conversion.
sourceimpl From<TwoWayBinding> for SyntaxNode
impl From<TwoWayBinding> for SyntaxNode
sourcefn from(original: TwoWayBinding) -> Self
fn from(original: TwoWayBinding) -> Self
Performs the conversion.
sourceimpl From<UnaryOpExpression> for SyntaxNode
impl From<UnaryOpExpression> for SyntaxNode
sourcefn from(original: UnaryOpExpression) -> Self
fn from(original: UnaryOpExpression) -> Self
Performs the conversion.
sourceimpl Spanned for SyntaxNode
impl Spanned for SyntaxNode
fn span(&self) -> Span
fn source_file(&self) -> Option<&SourceFile>
fn to_source_location(&self) -> SourceLocation
Auto Trait Implementations
impl !RefUnwindSafe for SyntaxNode
impl !Send for SyntaxNode
impl !Sync for SyntaxNode
impl Unpin for SyntaxNode
impl !UnwindSafe for SyntaxNode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more