pub struct ColumnIndex(pub u32);
Expand description
A zero-indexed column number
Tuple Fields§
§0: u32
Implementations§
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
Source§fn clone(&self) -> ColumnIndex
fn clone(&self) -> ColumnIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ColumnIndex
impl Debug for ColumnIndex
Source§impl Default for ColumnIndex
impl Default for ColumnIndex
Source§fn default() -> ColumnIndex
fn default() -> ColumnIndex
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ColumnIndex
impl<'de> Deserialize<'de> for ColumnIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ColumnIndex
impl Display 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
Source§fn cmp(&self, other: &ColumnIndex) -> Ordering
fn cmp(&self, other: &ColumnIndex) -> Ordering
1.21.0 · 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
Source§impl PartialEq for ColumnIndex
impl PartialEq for ColumnIndex
Source§impl PartialOrd for ColumnIndex
impl PartialOrd for ColumnIndex
Source§impl Serialize for ColumnIndex
impl Serialize 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 moreimpl Copy for ColumnIndex
impl Eq for ColumnIndex
impl StructuralPartialEq for ColumnIndex
Auto Trait Implementations§
impl Freeze for ColumnIndex
impl RefUnwindSafe for ColumnIndex
impl Send for ColumnIndex
impl Sync for ColumnIndex
impl Unpin 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