Struct line_numbers::LineNumber
source · pub struct LineNumber(pub u32);
Expand description
A distinct number type for line numbers, to prevent confusion with other numerical data.
Zero-indexed internally.
Tuple Fields§
§0: u32
Implementations§
Trait Implementations§
source§impl Clone for LineNumber
impl Clone for LineNumber
source§fn clone(&self) -> LineNumber
fn clone(&self) -> LineNumber
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 moresource§impl Debug for LineNumber
impl Debug for LineNumber
source§impl From<u32> for LineNumber
impl From<u32> for LineNumber
source§impl Hash for LineNumber
impl Hash for LineNumber
source§impl Ord for LineNumber
impl Ord for LineNumber
source§fn cmp(&self, other: &LineNumber) -> Ordering
fn cmp(&self, other: &LineNumber) -> 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<LineNumber> for LineNumber
impl PartialEq<LineNumber> for LineNumber
source§fn eq(&self, other: &LineNumber) -> bool
fn eq(&self, other: &LineNumber) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<LineNumber> for LineNumber
impl PartialOrd<LineNumber> for LineNumber
source§fn partial_cmp(&self, other: &LineNumber) -> Option<Ordering>
fn partial_cmp(&self, other: &LineNumber) -> 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 moreimpl Copy for LineNumber
impl Eq for LineNumber
impl StructuralEq for LineNumber
impl StructuralPartialEq for LineNumber
Auto Trait Implementations§
impl RefUnwindSafe for LineNumber
impl Send for LineNumber
impl Sync for LineNumber
impl Unpin for LineNumber
impl UnwindSafe for LineNumber
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