Struct codespan::LineNumber
source · [−]pub struct LineNumber(_);
Expand description
A 1-indexed line number. Useful for pretty printing source locations.
Implementations
sourceimpl LineNumber
impl LineNumber
Trait Implementations
sourceimpl Clone for LineNumber
impl Clone for LineNumber
sourcefn clone(&self) -> LineNumber
fn clone(&self) -> LineNumber
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LineNumber
impl Debug for LineNumber
sourceimpl<'de> Deserialize<'de> for LineNumber
impl<'de> Deserialize<'de> for LineNumber
sourcefn 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
sourceimpl Display for LineNumber
impl Display for LineNumber
sourceimpl Hash for LineNumber
impl Hash for LineNumber
sourceimpl Ord for LineNumber
impl Ord for LineNumber
sourceimpl PartialEq<LineNumber> for LineNumber
impl PartialEq<LineNumber> for LineNumber
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &LineNumber) -> bool
fn ne(&self, other: &LineNumber) -> bool
This method tests for !=
.
sourceimpl PartialOrd<LineNumber> for LineNumber
impl PartialOrd<LineNumber> for LineNumber
sourcefn partial_cmp(&self, other: &LineNumber) -> Option<Ordering>
fn partial_cmp(&self, other: &LineNumber) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more