[][src]Struct wavefront_rs::obj::read_lexer::ReadLexer

pub struct ReadLexer {}

Will read from a given BufRead and parse entities.

Implementations

impl ReadLexer[src]

pub fn read_to_end<R: BufRead>(
    reader: &mut R,
    callback: impl Fn(Entity)
) -> Result<(), Error>
[src]

Will read from the given BufReadas long as it is not EOF.
When an entity is parsed, the given callback is invoked and the entity is inserted into it as parameter.
Will return Ok(()) if successful or an Error (if parsing failed).

pub fn read_line<R: BufRead>(reader: &mut R) -> Result<Entity, Error>[src]

Will read from the given BufRead until the first encountered linebreak.
Will return Ok(Entity) if successful or an Error (if parsing failed).

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.