#[repr(transparent)]pub struct RegionId(pub u32);
Expand description
Index of a region in a hugr graph.
Tuple Fields§
§0: u32
Implementations§
Source§impl RegionId
impl RegionId
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 RegionId
impl Ord for RegionId
Source§impl PartialOrd for RegionId
impl PartialOrd for RegionId
impl Copy for RegionId
impl Eq for RegionId
impl StructuralPartialEq for RegionId
Auto Trait Implementations§
impl Freeze for RegionId
impl RefUnwindSafe for RegionId
impl Send for RegionId
impl Sync for RegionId
impl Unpin for RegionId
impl UnwindSafe for RegionId
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