Struct syntax::codemap::BytePosUnstable [-] [+] [src]

pub struct BytePos(pub u32);

A byte offset. Keep this small (currently 32-bits), as AST contains a lot of them.

Trait Implementations

impl Pos for BytePos

fn from_usize(n: usize) -> BytePos

fn to_usize(&self) -> usize

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 Debug for BytePos

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

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 Hash for BytePos

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Eq for BytePos

fn assert_receiver_is_total_eq(&self)

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)