Skip to main content

NodePathExt

Trait NodePathExt 

Source
pub trait NodePathExt: Sized {
    // Required methods
    fn placeholder() -> Self;
    fn fill_placeholder(
        &mut self,
        programs: &ProgramLookup,
        cached_body_items: usize,
        range: SourceRange,
    );
    fn from_range(
        programs: &ProgramLookup,
        cached_body_items: usize,
        range: SourceRange,
    ) -> Option<Self>;
    fn from_body(
        body: &[BodyItem],
        cached_body_items: usize,
        range: SourceRange,
        path: NodePath,
    ) -> Option<NodePath>;
    fn from_body_item(
        body_item: &BodyItem,
        range: SourceRange,
        path: NodePath,
    ) -> Option<NodePath>;
    fn from_expr(
        expr: &Expr,
        range: SourceRange,
        path: NodePath,
    ) -> Option<NodePath>;
    fn is_empty(&self) -> bool;
    fn push(&mut self, step: Step);
}

Required Methods§

Source

fn placeholder() -> Self

Source

fn fill_placeholder( &mut self, programs: &ProgramLookup, cached_body_items: usize, range: SourceRange, )

Source

fn from_range( programs: &ProgramLookup, cached_body_items: usize, range: SourceRange, ) -> Option<Self>

Source

fn from_body( body: &[BodyItem], cached_body_items: usize, range: SourceRange, path: NodePath, ) -> Option<NodePath>

Source

fn from_body_item( body_item: &BodyItem, range: SourceRange, path: NodePath, ) -> Option<NodePath>

Source

fn from_expr( expr: &Expr, range: SourceRange, path: NodePath, ) -> Option<NodePath>

Source

fn is_empty(&self) -> bool

Source

fn push(&mut self, step: Step)

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§