CharSeq

Struct CharSeq 

Source
pub struct CharSeq<'a> {
    pub pos: usize,
    pub text: String,
    pub place: String,
    pub enable_hook: bool,
    pub trace: bool,
    /* private fields */
}

Fields§

§pos: usize§text: String§place: String§enable_hook: bool§trace: bool

Implementations§

Source§

impl<'a> CharSeq<'a>

Source

pub fn view(&self) -> &str

Source

pub fn eof(&self) -> bool

Source

pub fn new(t: &str, l: &str) -> CharSeq<'a>

Source

pub fn fail<T>(&self, msg: &str) -> ParserResult<T>

Source

pub fn get_location(&self) -> LocationInfo

Source

pub fn current(&self) -> char

Source

pub fn next(&mut self)

Source

pub fn add_hook(&mut self, hook: &'a (dyn ParserHook + 'a))

Source

pub fn do_hook(&mut self)

Source

pub fn accept<T>(&mut self, p: &dyn Parser<T>) -> ParserResult<T>

Auto Trait Implementations§

§

impl<'a> Freeze for CharSeq<'a>

§

impl<'a> !RefUnwindSafe for CharSeq<'a>

§

impl<'a> !Send for CharSeq<'a>

§

impl<'a> !Sync for CharSeq<'a>

§

impl<'a> Unpin for CharSeq<'a>

§

impl<'a> !UnwindSafe for CharSeq<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.