Struct codespan::LineOffset
source · [−]pub struct LineOffset(pub RawOffset);
Expand description
A line offset in a source file
Tuple Fields
0: RawOffset
Trait Implementations
sourceimpl Add<LineOffset> for LineIndex
impl Add<LineOffset> for LineIndex
sourceimpl Add<LineOffset> for LineOffset
impl Add<LineOffset> for LineOffset
type Output = LineOffset
type Output = LineOffset
The resulting type after applying the +
operator.
sourcefn add(self, rhs: LineOffset) -> LineOffset
fn add(self, rhs: LineOffset) -> LineOffset
Performs the +
operation. Read more
sourceimpl AddAssign<LineOffset> for LineIndex
impl AddAssign<LineOffset> for LineIndex
sourcefn add_assign(&mut self, rhs: LineOffset)
fn add_assign(&mut self, rhs: LineOffset)
Performs the +=
operation. Read more
sourceimpl AddAssign<LineOffset> for LineOffset
impl AddAssign<LineOffset> for LineOffset
sourcefn add_assign(&mut self, rhs: LineOffset)
fn add_assign(&mut self, rhs: LineOffset)
Performs the +=
operation. Read more
sourceimpl Clone for LineOffset
impl Clone for LineOffset
sourcefn clone(&self) -> LineOffset
fn clone(&self) -> LineOffset
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 LineOffset
impl Debug for LineOffset
sourceimpl Default for LineOffset
impl Default for LineOffset
sourcefn default() -> LineOffset
fn default() -> LineOffset
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for LineOffset
impl<'de> Deserialize<'de> for LineOffset
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 LineOffset
impl Display for LineOffset
sourceimpl From<LineOffset> for RawOffset
impl From<LineOffset> for RawOffset
sourcefn from(offset: LineOffset) -> RawOffset
fn from(offset: LineOffset) -> RawOffset
Performs the conversion.
sourceimpl From<LineOffset> for usize
impl From<LineOffset> for usize
sourcefn from(offset: LineOffset) -> usize
fn from(offset: LineOffset) -> usize
Performs the conversion.
sourceimpl Hash for LineOffset
impl Hash for LineOffset
sourceimpl Neg for LineOffset
impl Neg for LineOffset
type Output = LineOffset
type Output = LineOffset
The resulting type after applying the -
operator.
sourcefn neg(self) -> LineOffset
fn neg(self) -> LineOffset
Performs the unary -
operation. Read more
sourceimpl Offset for LineOffset
impl Offset for LineOffset
const ZERO: LineOffset
sourceimpl Ord for LineOffset
impl Ord for LineOffset
sourceimpl PartialEq<LineOffset> for LineOffset
impl PartialEq<LineOffset> for LineOffset
sourcefn eq(&self, other: &LineOffset) -> bool
fn eq(&self, other: &LineOffset) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &LineOffset) -> bool
fn ne(&self, other: &LineOffset) -> bool
This method tests for !=
.
sourceimpl PartialOrd<LineOffset> for LineOffset
impl PartialOrd<LineOffset> for LineOffset
sourcefn partial_cmp(&self, other: &LineOffset) -> Option<Ordering>
fn partial_cmp(&self, other: &LineOffset) -> 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 LineOffset
impl Serialize for LineOffset
sourceimpl Sub<LineOffset> for LineOffset
impl Sub<LineOffset> for LineOffset
type Output = LineOffset
type Output = LineOffset
The resulting type after applying the -
operator.
sourcefn sub(self, rhs: LineOffset) -> LineOffset
fn sub(self, rhs: LineOffset) -> LineOffset
Performs the -
operation. Read more
sourceimpl Sub<LineOffset> for LineIndex
impl Sub<LineOffset> for LineIndex
sourceimpl SubAssign<LineOffset> for LineOffset
impl SubAssign<LineOffset> for LineOffset
sourcefn sub_assign(&mut self, rhs: LineOffset)
fn sub_assign(&mut self, rhs: LineOffset)
Performs the -=
operation. Read more
sourceimpl SubAssign<LineOffset> for LineIndex
impl SubAssign<LineOffset> for LineIndex
sourcefn sub_assign(&mut self, rhs: LineOffset)
fn sub_assign(&mut self, rhs: LineOffset)
Performs the -=
operation. Read more
impl Copy for LineOffset
impl Eq for LineOffset
impl StructuralEq for LineOffset
impl StructuralPartialEq for LineOffset
Auto Trait Implementations
impl RefUnwindSafe for LineOffset
impl Send for LineOffset
impl Sync for LineOffset
impl Unpin for LineOffset
impl UnwindSafe for LineOffset
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