#[repr(transparent)]pub struct NodeId(pub u32);
Expand description
Index of a node in a hugr graph.
Tuple Fields§
§0: u32
Implementations§
Source§impl NodeId
impl NodeId
Sourcepub fn index(self) -> usize
pub fn index(self) -> usize
Returns the index as a usize
to conveniently use it as a slice index.
Sourcepub fn unwrap_slice(slice: &[Self]) -> &[u32]
pub fn unwrap_slice(slice: &[Self]) -> &[u32]
Convert a slice of this index type into a slice of u32
s.
Sourcepub fn wrap_slice(slice: &[u32]) -> &[Self]
pub fn wrap_slice(slice: &[u32]) -> &[Self]
Convert a slice of u32
s into a slice of this index type.
Trait Implementations§
Source§impl Ord for NodeId
impl Ord for NodeId
Source§impl PartialOrd for NodeId
impl PartialOrd for NodeId
impl Copy for NodeId
impl Eq for NodeId
impl StructuralPartialEq for NodeId
Auto Trait Implementations§
impl Freeze for NodeId
impl RefUnwindSafe for NodeId
impl Send for NodeId
impl Sync for NodeId
impl Unpin for NodeId
impl UnwindSafe for NodeId
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