pub struct NodeCx<'a> {
pub bloq: &'a Bloq,
pub level: &'a SubGraph,
pub path: &'a LevelPath,
pub id: BloqNodeId,
pub node: &'a BloqNode,
}Expand description
Context for one node visited by Bloq::walk.
This carries the program (for templates), the node’s own graph level (for edge queries), the level’s path (for global identity), and the node itself.
id is level-local, so (path, id) together are the node’s program-unique
address; id alone only keys into the top level (see
LevelPath::top_level_ancestor). Use level to run edge queries — e.g.
level.incoming(id) — against the graph the node
actually lives in.
Fields§
§bloq: &'a BloqThe whole program, e.g. for resolving crate::TemplateIds.
level: &'a SubGraphThe graph level this node lives at — the target for edge queries.
path: &'a LevelPathThe owner path to level; empty at the top level.
id: BloqNodeIdThe node’s level-local id (unique only within level).
node: &'a BloqNodeThe visited node.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for NodeCx<'a>
impl<'a> RefUnwindSafe for NodeCx<'a>
impl<'a> Send for NodeCx<'a>
impl<'a> Sync for NodeCx<'a>
impl<'a> Unpin for NodeCx<'a>
impl<'a> UnsafeUnpin for NodeCx<'a>
impl<'a> UnwindSafe for NodeCx<'a>
Blanket Implementations§
§impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
fn assign_index(&mut self, index: usize, to: bool)
fn negate_index(&mut self, index: usize)
fn clear_bits(&mut self)
fn assign_random(
&mut self,
bit_count: usize,
random_number_generator: &mut impl RngExt,
)where
BorrowedSelf: BitLength,
§impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
fn assign(&mut self, other: &Other)
fn bitxor_assign(&mut self, other: &Other)
fn bitand_assign(&mut self, other: &Other)
fn bitor_assign(&mut self, other: &Other)
§impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
§impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
fn index(&self, index: usize) -> bool
fn weight(&self) -> usize
fn parity(&self) -> bool
fn is_zero(&self) -> bool
fn is_unit(&self, index: usize) -> bool
fn support<'a>(&'a self) -> impl SortedIteratorwhere
BorrowedSelf: 'a,
fn max_support(&self) -> Option<usize>
fn min_support(&self) -> Option<usize>
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