pub struct ByteIndex(pub u32);Expand description
A byte position in a source file.
Tuple Fields§
§0: u32Implementations§
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 moreimpl Copy for ByteIndex
impl Eq for ByteIndex
Source§impl From<SourceSpan> for ByteIndex
impl From<SourceSpan> for ByteIndex
Source§fn from(span: SourceSpan) -> Self
fn from(span: SourceSpan) -> Self
Converts to this type from the input type.
Source§impl Ord for ByteIndex
impl Ord for ByteIndex
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 PartialOrd for ByteIndex
impl PartialOrd for ByteIndex
impl StructuralPartialEq for ByteIndex
Source§impl Sub for ByteIndex
impl Sub for ByteIndex
Source§type Output = ByteOffset
type Output = ByteOffset
The resulting type after applying the
- operator.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 moreAuto Trait Implementations§
impl Freeze for ByteIndex
impl RefUnwindSafe for ByteIndex
impl Send for ByteIndex
impl Sync for ByteIndex
impl Unpin for ByteIndex
impl UnsafeUnpin 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