mod bytes_input;
mod read_input;
mod shared;
mod str_input;
mod token_stream;
use std::borrow::Cow;
pub use read_input::{ReadInput, ReadInputBuf};
pub use token_stream::TokenStream;
use crate::error::ParseResult;
use stable_pattern::Pattern;
pub trait Input<'a>: Copy + Sized {
fn input_len(self) -> usize;
fn trim_start(self) -> Self;
fn is_empty(self) -> bool;
fn display(self) -> Cow<'a, str>;
fn strip_prefix(self, prefix: &str) -> ParseResult<Option<Self>>;
fn find(self, needle: &str) -> ParseResult<Option<Self>>;
fn slice_to(self, end: Self) -> ParseResult<Self>;
fn take_char(self) -> ParseResult<Option<(char, Self)>>;
fn take_while<P>(self, predicate: P) -> ParseResult<(&'a str, Self)>
where
P: Pattern<'a> + Copy;
fn take_till<P>(self, predicate: P) -> ParseResult<(&'a str, Self)>
where
P: Pattern<'a> + Copy;
fn empty() -> Self;
}
#[cfg(test)]
mod tests;