[][src]Struct libyaml::Parser

pub struct Parser<'a> { /* fields omitted */ }

Parser.

Iteration

Box<Parser> implements IntoIterator<Item = Result<Event, ParserError>>, and thus can be used in for loops. The iterator is fused, and produces None forever after the end of stream or after a first encountered error.

Methods

impl<'a> Parser<'a>[src]

pub fn new<R: Read + 'a>(reader: R) -> Result<Box<Self>, ParserError>[src]

Create a parser with default configuration.

If a custom configuration is needed, use ParserBuilder to build a Parser instance.

pub fn parse(&mut self) -> Result<Event, ParserError>[src]

Parse an event.

pub fn as_raw_ptr(&mut self) -> *mut yaml_parser_t[src]

Return raw pointer to the underlying yaml_parser_t.

Trait Implementations

impl<'_> Drop for Parser<'_>[src]

Auto Trait Implementations

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

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

impl<'a> Unpin for Parser<'a>

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

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

Blanket Implementations

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

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

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.

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.

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

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

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