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§
source§impl ByteOffset
impl ByteOffset
Trait Implementations§
source§impl Add<u32> for ByteOffset
impl Add<u32> for ByteOffset
source§impl Add<ByteOffset> for ByteOffset
impl Add<ByteOffset> for ByteOffset
source§impl Clone for ByteOffset
impl Clone for ByteOffset
source§fn clone(&self) -> ByteOffset
fn clone(&self) -> ByteOffset
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ByteOffset
impl Debug for ByteOffset
source§impl Default for ByteOffset
impl Default for ByteOffset
source§fn default() -> ByteOffset
fn default() -> ByteOffset
Returns the “default value” for a type. Read more
source§impl From<ByteOffset> for BytePosition
impl From<ByteOffset> for BytePosition
source§fn from(offset: ByteOffset) -> Self
fn from(offset: ByteOffset) -> Self
Converts to this type from the input type.
source§impl From<usize> for ByteOffset
impl From<usize> for ByteOffset
source§impl Hash for ByteOffset
impl Hash for ByteOffset
source§impl Ord for ByteOffset
impl Ord for ByteOffset
source§fn cmp(&self, other: &ByteOffset) -> Ordering
fn cmp(&self, other: &ByteOffset) -> Ordering
1.21.0 · 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 PartialEq<ByteOffset> for ByteOffset
impl PartialEq<ByteOffset> for ByteOffset
source§fn 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 ==
.source§impl PartialOrd<ByteOffset> for ByteOffset
impl PartialOrd<ByteOffset> for ByteOffset
source§fn partial_cmp(&self, other: &ByteOffset) -> Option<Ordering>
fn partial_cmp(&self, other: &ByteOffset) -> Option<Ordering>
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<u32> for ByteOffset
impl Sub<u32> for ByteOffset
source§impl Sub<ByteOffset> for ByteOffset
impl Sub<ByteOffset> 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§
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.