[−][src]Struct cfg_lib::config::Parser
This implements the low-level parser of CFG source text.
Methods
impl<'a> Parser<'a>
[src]
pub fn new(r: Box<dyn Read + 'a>) -> StdResult<Self, RecognizerError>
[src]
Return a new instance of the parser using the provided reader for the source text. The first token is read.
pub fn at_end(&self) -> bool
[src]
Return true
if the parser has reached the end of the source, else false
.
pub fn location(&self) -> Location
[src]
Return the current location of the parser in the source.
pub fn container(&mut self) -> StdResult<ASTValue, RecognizerError>
[src]
Parse the contents of a configuration, which should be a mapping or a list, and return the parsed value or a syntax error.
pub fn expr(&mut self) -> StdResult<ASTValue, RecognizerError>
[src]
Parse an expression and return an AST node representing it, or a syntax error.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Parser<'a>
impl<'a> !Send for Parser<'a>
impl<'a> !Sync for Parser<'a>
impl<'a> Unpin for Parser<'a>
impl<'a> !UnwindSafe for Parser<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,