Struct gluon_base::pos::BytePos
source · pub struct BytePos(pub u32);
Expand description
A byte position in a source file
Tuple Fields
0: u32
Implementations
Trait Implementations
sourceimpl Add<ByteOffset> for ByteIndex
impl Add<ByteOffset> for ByteIndex
sourceimpl AddAssign<ByteOffset> for ByteIndex
impl AddAssign<ByteOffset> for ByteIndex
sourcefn add_assign(&mut self, rhs: ByteOffset)
fn add_assign(&mut self, rhs: ByteOffset)
Performs the
+=
operation. Read moresourceimpl Index for ByteIndex
impl Index for ByteIndex
type Offset = ByteOffset
sourceimpl Ord for ByteIndex
impl Ord for ByteIndex
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<ByteIndex> for ByteIndex
impl PartialOrd<ByteIndex> for ByteIndex
sourcefn partial_cmp(&self, other: &ByteIndex) -> Option<Ordering>
fn partial_cmp(&self, other: &ByteIndex) -> Option<Ordering>
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 moresourceimpl Sub<ByteIndex> for ByteIndex
impl Sub<ByteIndex> for ByteIndex
type Output = ByteOffset
type Output = ByteOffset
The resulting type after applying the
-
operator.sourcefn sub(self, rhs: ByteIndex) -> ByteOffset
fn sub(self, rhs: ByteIndex) -> ByteOffset
Performs the
-
operation. Read moresourceimpl Sub<ByteOffset> for ByteIndex
impl Sub<ByteOffset> for ByteIndex
sourceimpl SubAssign<ByteOffset> for ByteIndex
impl SubAssign<ByteOffset> for ByteIndex
sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more