Struct codespan::LineNumber
source · pub struct LineNumber(/* private fields */);
Expand description
A 1-indexed line number. Useful for pretty printing source locations.
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<'de> Deserialize<'de> for LineNumber
impl<'de> Deserialize<'de> for LineNumber
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 LineNumber
impl Display 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 for LineNumber
impl PartialEq 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 for LineNumber
impl PartialOrd 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 moresource§impl Serialize for LineNumber
impl Serialize for LineNumber
impl 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