Trait regex::internal::Input [−][src]
pub trait Input {
fn at(&self, i: usize) -> InputAt;
fn next_char(&self, at: InputAt) -> Char;
fn previous_char(&self, at: InputAt) -> Char;
fn is_empty_match(&self, at: InputAt, empty: &InstEmptyLook) -> bool;
fn prefix_at(
&self,
prefixes: &LiteralSearcher,
at: InputAt
) -> Option<InputAt>;
fn len(&self) -> usize;
fn as_bytes(&self) -> &[u8];
fn is_empty(&self) -> bool { ... }
}An abstraction over input used in the matching engines.
Required Methods
fn at(&self, i: usize) -> InputAt
Return an encoding of the position at byte offset i.
fn next_char(&self, at: InputAt) -> Char
Return the Unicode character occurring next to at.
If no such character could be decoded, then Char is absent.
fn previous_char(&self, at: InputAt) -> Char
Return the Unicode character occurring previous to at.
If no such character could be decoded, then Char is absent.
fn is_empty_match(&self, at: InputAt, empty: &InstEmptyLook) -> bool
Return true if the given empty width instruction matches at the input position given.
fn prefix_at(&self, prefixes: &LiteralSearcher, at: InputAt) -> Option<InputAt>
Scan the input for a matching prefix.
fn len(&self) -> usize
The number of bytes in the input.
fn as_bytes(&self) -> &[u8]
Return the given input as a sequence of bytes.
Provided Methods
Implementations on Foreign Types
impl<'a, T: Input> Input for &'a T[src]
impl<'a, T: Input> Input for &'a Tfn at(&self, i: usize) -> InputAt[src]
fn at(&self, i: usize) -> InputAtfn next_char(&self, at: InputAt) -> Char[src]
fn next_char(&self, at: InputAt) -> Charfn previous_char(&self, at: InputAt) -> Char[src]
fn previous_char(&self, at: InputAt) -> Charfn is_empty_match(&self, at: InputAt, empty: &InstEmptyLook) -> bool[src]
fn is_empty_match(&self, at: InputAt, empty: &InstEmptyLook) -> boolfn prefix_at(&self, prefixes: &LiteralSearcher, at: InputAt) -> Option<InputAt>[src]
fn prefix_at(&self, prefixes: &LiteralSearcher, at: InputAt) -> Option<InputAt>fn len(&self) -> usize[src]
fn len(&self) -> usizefn as_bytes(&self) -> &[u8][src]
fn as_bytes(&self) -> &[u8]fn is_empty(&self) -> bool[src]
fn is_empty(&self) -> bool