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

pub struct CharPos(pub uint);

A character offset. Because of multibyte utf8 characters, a byte offset is not equivalent to a character offset. The CodeMap will convert BytePos values to CharPos values as necessary.

Trait Implementations

impl Pos for CharPos

fn from_uint(n: uint) -> CharPos

fn to_uint(&self) -> uint

impl Add<CharPos, CharPos> for CharPos

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

impl Sub<CharPos, CharPos> for CharPos

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

Derived Implementations

impl Show for CharPos

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

impl PartialOrd for CharPos

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

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

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

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

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

impl<__S: Writer> Hash<__S> for CharPos

fn hash(&self, __arg_0: &mut __S)

impl PartialEq for CharPos

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

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

impl Copy for CharPos