#[repr(transparent)]pub struct LinkId(pub u32);Expand description
Index of a link in a hugr graph.
Tuple Fields§
§0: u32Implementations§
source§impl LinkId
impl LinkId
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 u32s.
sourcepub fn wrap_slice(slice: &[u32]) -> &[Self]
pub fn wrap_slice(slice: &[u32]) -> &[Self]
Convert a slice of u32s into a slice of this index type.
Trait Implementations§
source§impl Ord for LinkId
impl Ord for LinkId
source§impl PartialOrd for LinkId
impl PartialOrd for LinkId
impl Copy for LinkId
impl Eq for LinkId
impl StructuralPartialEq for LinkId
Auto Trait Implementations§
impl Freeze for LinkId
impl RefUnwindSafe for LinkId
impl Send for LinkId
impl Sync for LinkId
impl Unpin for LinkId
impl UnwindSafe for LinkId
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)