pub struct NodeRef<'cst> { /* private fields */ }Implementations§
Source§impl<'cst> NodeRef<'cst>
impl<'cst> NodeRef<'cst>
pub fn cst(&self) -> &Cst
pub fn handle(&self) -> NodeHandle
pub fn project(self, f: impl FnOnce(&Cst, NodeHandle) -> NodeHandle) -> Self
pub fn try_project( self, f: impl FnOnce(&Cst, NodeHandle) -> Option<NodeHandle>, ) -> Option<Self>
pub fn parent(self) -> Option<Self>
pub fn next_sibling(self) -> Option<Self>
pub fn prev_sibling(self) -> Option<Self>
pub fn children(self) -> Children<'cst> ⓘ
pub fn span(self, ot: &OriginTable) -> Option<Span>
pub fn contains(self, inner: NodeHandle) -> bool
Trait Implementations§
impl<'cst> Copy for NodeRef<'cst>
impl Eq for NodeRef<'_>
Auto Trait Implementations§
impl<'cst> Freeze for NodeRef<'cst>
impl<'cst> RefUnwindSafe for NodeRef<'cst>
impl<'cst> Send for NodeRef<'cst>
impl<'cst> Sync for NodeRef<'cst>
impl<'cst> Unpin for NodeRef<'cst>
impl<'cst> UnsafeUnpin for NodeRef<'cst>
impl<'cst> UnwindSafe for NodeRef<'cst>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more