Struct partiql_source_map::location::ByteOffset
source · [−]pub struct ByteOffset(pub u32);
Expand description
A 0-indexed byte offset, relative to some other position.
This type is small (u32 currently) to allow it to be included in ASTs and other data structures.
Tuple Fields
0: u32
Implementations
sourceimpl ByteOffset
impl ByteOffset
Trait Implementations
sourceimpl Add<ByteOffset> for ByteOffset
impl Add<ByteOffset> for ByteOffset
sourceimpl Add<u32> for ByteOffset
impl Add<u32> for ByteOffset
sourceimpl Clone for ByteOffset
impl Clone for ByteOffset
sourcefn clone(&self) -> ByteOffset
fn clone(&self) -> ByteOffset
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 ByteOffset
impl Debug for ByteOffset
sourceimpl Default for ByteOffset
impl Default for ByteOffset
sourcefn default() -> ByteOffset
fn default() -> ByteOffset
Returns the “default value” for a type. Read more
sourceimpl From<ByteOffset> for BytePosition
impl From<ByteOffset> for BytePosition
sourcefn from(offset: ByteOffset) -> Self
fn from(offset: ByteOffset) -> Self
Converts to this type from the input type.
sourceimpl From<usize> for ByteOffset
impl From<usize> for ByteOffset
sourceimpl Hash for ByteOffset
impl Hash for ByteOffset
sourceimpl Ord for ByteOffset
impl Ord for ByteOffset
sourcefn cmp(&self, other: &ByteOffset) -> Ordering
fn cmp(&self, other: &ByteOffset) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<ByteOffset> for ByteOffset
impl PartialEq<ByteOffset> for ByteOffset
sourcefn eq(&self, other: &ByteOffset) -> bool
fn eq(&self, other: &ByteOffset) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ByteOffset) -> bool
fn ne(&self, other: &ByteOffset) -> bool
This method tests for !=
.
sourceimpl PartialOrd<ByteOffset> for ByteOffset
impl PartialOrd<ByteOffset> for ByteOffset
sourcefn partial_cmp(&self, other: &ByteOffset) -> Option<Ordering>
fn partial_cmp(&self, other: &ByteOffset) -> 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 Sub<ByteOffset> for ByteOffset
impl Sub<ByteOffset> for ByteOffset
sourceimpl Sub<u32> for ByteOffset
impl Sub<u32> for ByteOffset
impl Copy for ByteOffset
impl Eq for ByteOffset
impl StructuralEq for ByteOffset
impl StructuralPartialEq for ByteOffset
Auto Trait Implementations
impl RefUnwindSafe for ByteOffset
impl Send for ByteOffset
impl Sync for ByteOffset
impl Unpin for ByteOffset
impl UnwindSafe for ByteOffset
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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