pub struct ByteIndex(pub u32);
Expand description
An index representing the offset in bytes from the start of a source file
Tuple Fields§
§0: u32
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 AddAssign<u32> for ByteIndex
impl AddAssign<u32> for ByteIndex
Source§fn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
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 PartialOrd for ByteIndex
impl PartialOrd for ByteIndex
Source§impl RangeBounds<ByteIndex> for SourceSpan
impl RangeBounds<ByteIndex> for SourceSpan
Source§impl Sub<ByteOffset> for ByteIndex
impl Sub<ByteOffset> for ByteIndex
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 moreSource§impl SubAssign<u32> for ByteIndex
impl SubAssign<u32> for ByteIndex
Source§fn sub_assign(&mut self, rhs: u32)
fn sub_assign(&mut self, rhs: u32)
Performs the
-=
operation. Read moreimpl Copy for ByteIndex
impl Eq for ByteIndex
impl StructuralPartialEq for ByteIndex
Auto Trait Implementations§
impl Freeze for ByteIndex
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