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: u32Implementations§
source§impl ByteOffset
impl ByteOffset
Trait Implementations§
source§impl Add<ByteOffset> for ByteOffset
impl Add<ByteOffset> for ByteOffset
source§impl Add<u32> for ByteOffset
impl Add<u32> 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 more