Struct regex::internal::InputAt [−][src]
Represents a location in the input.
Fields
pos: usize
c: Char
byte: Option<u8>
len: usize
Methods
impl InputAt
[src]
impl InputAt
pub fn is_start(&self) -> bool
[src]
pub fn is_start(&self) -> bool
Returns true iff this position is at the beginning of the input.
pub fn is_end(&self) -> bool
[src]
pub fn is_end(&self) -> bool
Returns true iff this position is past the end of the input.
pub fn char(&self) -> Char
[src]
pub fn char(&self) -> Char
Returns the character at this position.
If this position is just before or after the input, then an absent character is returned.
pub fn byte(&self) -> Option<u8>
[src]
pub fn byte(&self) -> Option<u8>
Returns the byte at this position.
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
Returns the UTF-8 width of the character at this position.
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
Returns whether the UTF-8 width of the character at this position is zero.
pub fn pos(&self) -> usize
[src]
pub fn pos(&self) -> usize
Returns the byte offset of this position.
pub fn next_pos(&self) -> usize
[src]
pub fn next_pos(&self) -> usize
Returns the byte offset of the next position in the input.
Trait Implementations
impl Clone for InputAt
[src]
impl Clone for InputAt
fn clone(&self) -> InputAt
[src]
fn clone(&self) -> InputAt
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 Copy for InputAt
[src]
impl Copy for InputAt
impl Debug for InputAt
[src]
impl Debug for InputAt