Struct abnf_parser::parser::Parser[][src]

pub struct Parser { /* fields omitted */ }

Implementations

impl Parser[src]

pub fn new(s: String) -> Parser[src]

Constructor.

pub fn input(&self) -> &str[src]

Get input string at current position.

pub fn input_len(&self) -> usize[src]

Return remaining input length.

pub fn pos(&self) -> usize[src]

Return parser cusor position.

pub fn pos_set(&mut self, pos: usize)[src]

Set cursor position.

pub fn line(&self) -> usize[src]

Return line number.

pub fn line_add(&self, len: usize)[src]

Add len to line number.

pub fn get_token(&mut self) -> Result<Token, AbnfParseError>[src]

Get single token and parsed length.

pub fn parse(&mut self) -> Result<HashMap<String, Repetition>, AbnfParseError>[src]

Parser parse entry point. Return a rulelist.

pub fn parse_rule(&mut self) -> Result<Repetition, AbnfParseError>[src]

Recursively parse input and find rules.

Auto Trait Implementations

impl !RefUnwindSafe for Parser

impl Send for Parser

impl !Sync for Parser

impl Unpin for Parser

impl UnwindSafe for Parser

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.