Enum syntax_pos::NonNarrowChar [−][src]
Identifies an offset of a non-narrow character in a FileMap
Variants
ZeroWidth(BytePos)
Represents a zero-width character
Wide(BytePos)
Represents a wide (fullwidth) character
Tab(BytePos)
Represents a tab character, represented visually with a width of 4 characters
Methods
impl NonNarrowChar
[src]
impl NonNarrowChar
pub fn pos(&self) -> BytePos
[src]
pub fn pos(&self) -> BytePos
Returns the absolute offset of the character in the CodeMap
pub fn width(&self) -> usize
[src]
pub fn width(&self) -> usize
Returns the width of the character, 0 (zero-width) or 2 (wide)
Trait Implementations
impl Copy for NonNarrowChar
[src]
impl Copy for NonNarrowChar
impl Clone for NonNarrowChar
[src]
impl Clone for NonNarrowChar
fn clone(&self) -> NonNarrowChar
[src]
fn clone(&self) -> NonNarrowChar
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Encodable for NonNarrowChar
[src]
impl Encodable for NonNarrowChar
impl Decodable for NonNarrowChar
[src]
impl Decodable for NonNarrowChar
impl Eq for NonNarrowChar
[src]
impl Eq for NonNarrowChar
impl PartialEq for NonNarrowChar
[src]
impl PartialEq for NonNarrowChar
fn eq(&self, other: &NonNarrowChar) -> bool
[src]
fn eq(&self, other: &NonNarrowChar) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &NonNarrowChar) -> bool
[src]
fn ne(&self, other: &NonNarrowChar) -> bool
This method tests for !=
.
impl Debug for NonNarrowChar
[src]
impl Debug for NonNarrowChar
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Add<BytePos> for NonNarrowChar
[src]
impl Add<BytePos> for NonNarrowChar
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: BytePos) -> Self
[src]
fn add(self, rhs: BytePos) -> Self
Performs the +
operation.
impl Sub<BytePos> for NonNarrowChar
[src]
impl Sub<BytePos> for NonNarrowChar
Auto Trait Implementations
impl Send for NonNarrowChar
impl Send for NonNarrowChar
impl Sync for NonNarrowChar
impl Sync for NonNarrowChar