Struct gluon_base::pos::Column
pub struct Column(pub u32);
Expand description
A zero-indexed column offset into a source file
Tuple Fields§
§0: u32
Implementations§
§impl ColumnIndex
impl ColumnIndex
pub const fn number(self) -> ColumnNumber
pub const fn number(self) -> ColumnNumber
The 1-indexed column number. Useful for pretty printing source locations.
use codespan::{ColumnIndex, ColumnNumber};
assert_eq!(format!("{}", ColumnIndex(0).number()), "1");
assert_eq!(format!("{}", ColumnIndex(3).number()), "4");
Trait Implementations§
§impl Add<ColumnOffset> for ColumnIndex
impl Add<ColumnOffset> for ColumnIndex
§type Output = ColumnIndex
type Output = ColumnIndex
The resulting type after applying the
+
operator.§fn add(self, rhs: ColumnOffset) -> ColumnIndex
fn add(self, rhs: ColumnOffset) -> ColumnIndex
Performs the
+
operation. Read more§impl AddAssign<ColumnOffset> for ColumnIndex
impl AddAssign<ColumnOffset> for ColumnIndex
§fn add_assign(&mut self, rhs: ColumnOffset)
fn add_assign(&mut self, rhs: ColumnOffset)
Performs the
+=
operation. Read more§impl Clone for ColumnIndex
impl Clone for ColumnIndex
§fn clone(&self) -> ColumnIndex
fn clone(&self) -> ColumnIndex
Returns a copy 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 more§impl Debug for ColumnIndex
impl Debug for ColumnIndex
§impl Default for ColumnIndex
impl Default for ColumnIndex
§fn default() -> ColumnIndex
fn default() -> ColumnIndex
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for ColumnIndex
impl<'de> Deserialize<'de> for ColumnIndex
§fn deserialize<__D>(
__deserializer: __D
) -> Result<ColumnIndex, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ColumnIndex, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for ColumnIndex
impl Display for ColumnIndex
§impl From<u32> for ColumnIndex
impl From<u32> for ColumnIndex
§fn from(i: u32) -> ColumnIndex
fn from(i: u32) -> ColumnIndex
Converts to this type from the input type.
§impl Hash for ColumnIndex
impl Hash for ColumnIndex
§impl Index for ColumnIndex
impl Index for ColumnIndex
type Offset = ColumnOffset
§impl Ord for ColumnIndex
impl Ord for ColumnIndex
§impl PartialEq for ColumnIndex
impl PartialEq for ColumnIndex
§fn eq(&self, other: &ColumnIndex) -> bool
fn eq(&self, other: &ColumnIndex) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for ColumnIndex
impl PartialOrd for ColumnIndex
§fn partial_cmp(&self, other: &ColumnIndex) -> Option<Ordering>
fn partial_cmp(&self, other: &ColumnIndex) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl Serialize for ColumnIndex
impl Serialize for ColumnIndex
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl Sub<ColumnOffset> for ColumnIndex
impl Sub<ColumnOffset> for ColumnIndex
§type Output = ColumnIndex
type Output = ColumnIndex
The resulting type after applying the
-
operator.§fn sub(self, rhs: ColumnOffset) -> ColumnIndex
fn sub(self, rhs: ColumnOffset) -> ColumnIndex
Performs the
-
operation. Read more§impl Sub for ColumnIndex
impl Sub for ColumnIndex
§type Output = ColumnOffset
type Output = ColumnOffset
The resulting type after applying the
-
operator.§fn sub(self, rhs: ColumnIndex) -> ColumnOffset
fn sub(self, rhs: ColumnIndex) -> ColumnOffset
Performs the
-
operation. Read more§impl SubAssign<ColumnOffset> for ColumnIndex
impl SubAssign<ColumnOffset> for ColumnIndex
§fn sub_assign(&mut self, rhs: ColumnOffset)
fn sub_assign(&mut self, rhs: ColumnOffset)
Performs the
-=
operation. Read moreimpl Copy for ColumnIndex
impl Eq for ColumnIndex
impl StructuralEq for ColumnIndex
impl StructuralPartialEq for ColumnIndex
Auto Trait Implementations§
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