pub struct ByteIndex(pub RawIndex);
Expand description
A byte position in a source file.
Tuple Fields§
§0: RawIndex
Implementations§
Trait Implementations§
source§impl Add<ByteOffset> for ByteIndex
impl Add<ByteOffset> for ByteIndex
source§impl AddAssign<ByteOffset> for ByteIndex
impl AddAssign<ByteOffset> for ByteIndex
source§fn add_assign(&mut self, rhs: ByteOffset)
fn add_assign(&mut self, rhs: ByteOffset)
Performs the
+=
operation. Read moresource§impl<'de> Deserialize<'de> for ByteIndex
impl<'de> Deserialize<'de> for ByteIndex
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 Ord for ByteIndex
impl Ord for ByteIndex
source§impl PartialEq for ByteIndex
impl PartialEq for ByteIndex
source§impl PartialOrd for ByteIndex
impl PartialOrd for ByteIndex
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 Sub<ByteOffset> for ByteIndex
impl Sub<ByteOffset> for ByteIndex
source§impl Sub for ByteIndex
impl Sub for ByteIndex
§type Output = ByteOffset
type Output = ByteOffset
The resulting type after applying the
-
operator.source§impl SubAssign<ByteOffset> for ByteIndex
impl SubAssign<ByteOffset> for ByteIndex
source§fn sub_assign(&mut self, rhs: ByteOffset)
fn sub_assign(&mut self, rhs: ByteOffset)
Performs the
-=
operation. Read moreimpl Copy for ByteIndex
impl Eq for ByteIndex
impl StructuralEq for ByteIndex
impl StructuralPartialEq for ByteIndex
Auto Trait Implementations§
impl RefUnwindSafe for ByteIndex
impl Send for ByteIndex
impl Sync for ByteIndex
impl Unpin for ByteIndex
impl UnwindSafe for ByteIndex
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