Skip to main content

AstPathExt

Trait AstPathExt 

Source
pub trait AstPathExt {
    // Required methods
    fn is1(&self, segment: &str) -> bool;
    fn as_one_segment(&self) -> Option<SmolStr>;
    fn as_up_to_two_segment(&self) -> Option<(SmolStr, Option<SmolStr>)>;
}

Required Methods§

Source

fn is1(&self, segment: &str) -> bool

Source

fn as_one_segment(&self) -> Option<SmolStr>

Source

fn as_up_to_two_segment(&self) -> Option<(SmolStr, Option<SmolStr>)>

Implementations on Foreign Types§

Source§

impl AstPathExt for Option<Path>

Source§

fn is1(&self, segment: &str) -> bool

Source§

fn as_one_segment(&self) -> Option<SmolStr>

Source§

fn as_up_to_two_segment(&self) -> Option<(SmolStr, Option<SmolStr>)>

Source§

impl AstPathExt for Path

Source§

fn is1(&self, segment: &str) -> bool

Source§

fn as_one_segment(&self) -> Option<SmolStr>

Source§

fn as_up_to_two_segment(&self) -> Option<(SmolStr, Option<SmolStr>)>

Implementors§