pub struct ColumnIndex(pub u32);Expand description
A zero-indexed column number
Tuple Fields§
§0: u32Implementations§
Source§impl ColumnIndex
impl ColumnIndex
Sourcepub const fn number(self) -> ColumnNumber
pub const fn number(self) -> ColumnNumber
Convert to a ColumnNumber
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_add_signed(self, offset: i32) -> Option<Self>
pub fn checked_add_signed(self, offset: i32) -> Option<Self>
Add a signed 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_add_signed(self, offset: i32) -> Self
pub const fn saturating_add_signed(self, offset: i32) -> Self
Add a signed offset to this index, saturating to 0 on underflow, and 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 Add<i32> for ColumnIndex
impl Add<i32> for ColumnIndex
Source§impl Add<u32> for ColumnIndex
impl Add<u32> for ColumnIndex
Source§impl AddAssign<i32> for ColumnIndex
impl AddAssign<i32> for ColumnIndex
Source§fn add_assign(&mut self, rhs: i32)
fn add_assign(&mut self, rhs: i32)
Performs the
+= operation. Read moreSource§impl AddAssign<u32> for ColumnIndex
impl AddAssign<u32> for ColumnIndex
Source§fn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
Performs the
+= operation. Read moreSource§impl Clone for ColumnIndex
impl Clone for ColumnIndex
impl Copy for ColumnIndex
Source§impl Debug for ColumnIndex
impl Debug for ColumnIndex
Source§impl Default for ColumnIndex
impl Default for ColumnIndex
Source§impl Display for ColumnIndex
impl Display for ColumnIndex
impl Eq for ColumnIndex
Source§impl From<ColumnIndex> for ColumnNumber
impl From<ColumnIndex> for ColumnNumber
Source§fn from(index: ColumnIndex) -> Self
fn from(index: ColumnIndex) -> Self
Converts to this type from the input type.
Source§impl From<ColumnNumber> for ColumnIndex
impl From<ColumnNumber> for ColumnIndex
Source§fn from(index: ColumnNumber) -> Self
fn from(index: ColumnNumber) -> Self
Converts to this type from the input type.
Source§impl From<u32> for ColumnIndex
impl From<u32> for ColumnIndex
Source§impl Hash for ColumnIndex
impl Hash for ColumnIndex
Source§impl Ord for ColumnIndex
impl Ord for ColumnIndex
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ColumnIndex
impl PartialEq for ColumnIndex
Source§impl PartialOrd for ColumnIndex
impl PartialOrd for ColumnIndex
impl StructuralPartialEq for ColumnIndex
Source§impl Sub<u32> for ColumnIndex
impl Sub<u32> for ColumnIndex
Source§impl SubAssign<u32> for ColumnIndex
impl SubAssign<u32> for ColumnIndex
Source§fn sub_assign(&mut self, rhs: u32)
fn sub_assign(&mut self, rhs: u32)
Performs the
-= operation. Read moreAuto Trait Implementations§
impl Forget for ColumnIndex
impl Freeze for ColumnIndex
impl Move for ColumnIndex
impl RefUnwindSafe for ColumnIndex
impl Send for ColumnIndex
impl Sync for ColumnIndex
impl Unpin for ColumnIndex
impl UnsafeUnpin for ColumnIndex
impl UnwindSafe for ColumnIndex
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