Struct xswag_base::code::BytePos [] [src]

pub struct BytePos(pub SrcOffset);

Position within source specified by byte offset. This is not equal to CharPos thanks to UTF-8 and multibyte chars. This type always represents positions relative to the whole codemap.

Trait Implementations

impl Add for BytePos

type Output = BytePos

fn add(self, rhs: BytePos) -> BytePos

impl Sub for BytePos

type Output = BytePos

fn sub(self, rhs: BytePos) -> BytePos

Derived Implementations

impl Default for BytePos

fn default() -> BytePos

impl Debug for BytePos

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Ord for BytePos

fn cmp(&self, __arg_0: &BytePos) -> Ordering

impl PartialOrd for BytePos

fn partial_cmp(&self, __arg_0: &BytePos) -> Option<Ordering>

fn lt(&self, __arg_0: &BytePos) -> bool

fn le(&self, __arg_0: &BytePos) -> bool

fn gt(&self, __arg_0: &BytePos) -> bool

fn ge(&self, __arg_0: &BytePos) -> bool

impl Eq for BytePos

impl PartialEq for BytePos

fn eq(&self, __arg_0: &BytePos) -> bool

fn ne(&self, __arg_0: &BytePos) -> bool

impl Copy for BytePos

impl Clone for BytePos

fn clone(&self) -> BytePos

fn clone_from(&mut self, source: &Self)