pub struct NodeRef<'a> { /* private fields */ }Expand description
Zero-cost validated read handle to a live node (Copy, 2 registers: &NodeStore + NodeIndex).
Created via NodeStore::get, which validates bounds, LIVE, and generation once; every
subsequent read on the handle skips repeated liveness/generation checks.
Implementations§
Source§impl<'a> NodeRef<'a>
impl<'a> NodeRef<'a>
pub fn raw_row(self) -> &'a NodeRow
pub fn index(self) -> NodeIndex
pub fn id(self) -> NodeId
pub fn tables(self) -> TableSet
pub fn primary_slot(self) -> TableSlot
pub fn is_inline(self) -> bool
pub fn is_connected(self) -> bool
pub fn parent(self) -> Option<NodeId>
pub fn children(self) -> &'a [NodeId]
pub fn has<T: NvTable>(self) -> bool
pub fn has_slot(self, slot: TableSlot) -> bool
pub fn words(self, slot: TableSlot) -> Option<&'a [Word]>
pub fn try_row<T: NvTable>(self) -> Option<T::Ref<'a>>
pub fn row<T: NvTable>(self) -> T::Ref<'a>
Sourcepub fn try_str(self, span: StrSpan) -> Option<&'a str>
pub fn try_str(self, span: StrSpan) -> Option<&'a str>
Checked UTF-8 lookup for a detached StrSpan (None if stale or invalid UTF-8).
Sourcepub fn str(self, span: StrSpan) -> &'a str
pub fn str(self, span: StrSpan) -> &'a str
Checked UTF-8 lookup for a detached StrSpan (returns "" if stale).
pub fn resource<R: FlatResource>(self, id: ResourceId) -> Option<R::View<'a>>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for NodeRef<'a>
impl<'a> Freeze for NodeRef<'a>
impl<'a> Move for NodeRef<'a>
impl<'a> RefUnwindSafe for NodeRef<'a>
impl<'a> Send for NodeRef<'a>
impl<'a> Sync for NodeRef<'a>
impl<'a> Unpin for NodeRef<'a>
impl<'a> UnsafeUnpin for NodeRef<'a>where
&'a NodeStore: UnsafeUnpin,
impl<'a> UnwindSafe for NodeRef<'a>where
&'a NodeStore: UnwindSafe,
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