Skip to main content

Element

Trait Element 

Source
pub trait Element {
    // Required method
    fn syntax_element(
        self,
    ) -> NodeOrToken<SyntaxNode<RustLanguage>, SyntaxToken<RustLanguage>>;
}
Expand description

Utility trait to allow calling syntax editor functions with references or owned nodes. Do not use outside of this module.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Element for SyntaxNode<RustLanguage>

Source§

impl Element for SyntaxToken<RustLanguage>

Source§

impl<E> Element for &E
where E: Element + Clone,

Implementors§