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

Return an encoding of the position at byte offset i.

Return the Unicode character occurring next to at.

If no such character could be decoded, then Char is absent.

Return the Unicode character occurring previous to at.

If no such character could be decoded, then Char is absent.

Return true if the given empty width instruction matches at the input position given.

Scan the input for a matching prefix.

The number of bytes in the input.

Return the given input as a sequence of bytes.

Provided Methods

Whether the input is empty.

Implementations on Foreign Types

impl<'a, T: Input> Input for &'a T
[src]

Implementors