pub struct LineNumber(/* private fields */);Expand description
1-based line number in a source file.
Zero is invalid; use LineNumber::try_new to reject it explicitly.
Implementations§
Trait Implementations§
Source§impl Clone for LineNumber
impl Clone for LineNumber
Source§fn clone(&self) -> LineNumber
fn clone(&self) -> LineNumber
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LineNumber
Source§impl Debug for LineNumber
impl Debug for LineNumber
Source§impl Display for LineNumber
impl Display for LineNumber
impl Eq for LineNumber
Source§impl From<LineNumber> for usize
impl From<LineNumber> for usize
Source§fn from(value: LineNumber) -> Self
fn from(value: LineNumber) -> Self
Converts to this type from the input type.
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 (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
Source§impl PartialEq for LineNumber
impl PartialEq for LineNumber
Source§fn eq(&self, other: &LineNumber) -> bool
fn eq(&self, other: &LineNumber) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for LineNumber
impl PartialOrd for LineNumber
impl StructuralPartialEq for LineNumber
Auto Trait Implementations§
impl Freeze for LineNumber
impl RefUnwindSafe for LineNumber
impl Send for LineNumber
impl Sync for LineNumber
impl Unpin for LineNumber
impl UnsafeUnpin 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