Struct miden_core::debuginfo::LineIndex
source · pub struct LineIndex(/* private fields */);
Expand description
A zero-indexed line number
Implementations§
source§impl LineIndex
impl LineIndex
sourcepub const fn number(self) -> NonZeroU32
pub const fn number(self) -> NonZeroU32
Get a one-indexed number for display
sourcepub fn checked_add(self, offset: u32) -> Option<Self>
pub fn checked_add(self, offset: u32) -> Option<Self>
Add offset
to this index, returning None
on overflow
sourcepub fn checked_sub(self, offset: u32) -> Option<Self>
pub fn checked_sub(self, offset: u32) -> Option<Self>
Subtract offset
from this index, returning None
on underflow
sourcepub const fn saturating_add(self, offset: u32) -> Self
pub const fn saturating_add(self, offset: u32) -> Self
Add offset
to this index, saturating to u32::MAX
on overflow
sourcepub const fn saturating_sub(self, offset: u32) -> Self
pub const fn saturating_sub(self, offset: u32) -> Self
Subtract offset
from this index, saturating to 0
on overflow
Trait Implementations§
source§impl Ord for LineIndex
impl Ord for LineIndex
source§impl PartialOrd for LineIndex
impl PartialOrd for LineIndex
impl Copy for LineIndex
impl Eq for LineIndex
impl StructuralPartialEq for LineIndex
Auto Trait Implementations§
impl Freeze for LineIndex
impl RefUnwindSafe for LineIndex
impl Send for LineIndex
impl Sync for LineIndex
impl Unpin for LineIndex
impl UnwindSafe for LineIndex
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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
)