[−][src]Struct libyaml::Parser
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
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]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,