swc_html_visit

Type Alias AstNodePath

source
pub type AstNodePath<'ast> = AstNodePath<AstParentNodeRef<'ast>>;

Aliased Type§

struct AstNodePath<'ast> { /* private fields */ }

Implementations

§

impl<N> AstNodePath<N>
where N: NodeRef,

pub fn new( kinds: AstKindPath<<N as NodeRef>::ParentKind>, path: Vec<N>, ) -> AstNodePath<N>

pub fn kinds(&self) -> &AstKindPath<<N as NodeRef>::ParentKind>

pub fn with_guard(&mut self, node: N) -> AstNodePathGuard<'_, N>

pub fn with_index_guard(&mut self, index: usize) -> AstNodePathIndexGuard<'_, N>

pub fn with<F, Ret>(&mut self, node: N, op: F) -> Ret
where F: for<'aa> FnOnce(&'aa mut AstNodePath<N>) -> Ret,

👎Deprecated: Use with_guard instead

pub fn with_index<F, Ret>(&mut self, index: usize, op: F) -> Ret
where F: for<'aa> FnOnce(&'aa mut AstNodePath<N>) -> Ret,

👎Deprecated: Use with_index_guard instead

Trait Implementations

§

impl<N> Clone for AstNodePath<N>
where N: Clone + NodeRef, <N as NodeRef>::ParentKind: Clone,

§

fn clone(&self) -> AstNodePath<N>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
§

impl<N> Debug for AstNodePath<N>
where N: Debug + NodeRef, <N as NodeRef>::ParentKind: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<N> Default for AstNodePath<N>
where N: NodeRef,

§

fn default() -> AstNodePath<N>

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

impl<N> Deref for AstNodePath<N>
where N: NodeRef,

§

type Target = Vec<N>

The resulting type after dereferencing.
§

fn deref(&self) -> &<AstNodePath<N> as Deref>::Target

Dereferences the value.
§

impl<N> PartialEq for AstNodePath<N>
where N: PartialEq + NodeRef, <N as NodeRef>::ParentKind: PartialEq,

§

fn eq(&self, other: &AstNodePath<N>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<N> Eq for AstNodePath<N>
where N: Eq + NodeRef, <N as NodeRef>::ParentKind: Eq,

§

impl<N> StructuralPartialEq for AstNodePath<N>
where N: NodeRef,