[][src]Struct ttb::Reader

pub struct Reader<R: Read> { /* fields omitted */ }

A wrapper for a type implementing Read, for reading TTB data

Implementations

impl<R: Read> Reader<R>[src]

pub fn new(reader: R) -> Self[src]

Create a new Reader by wrapping a type implementing Read.

pub fn next_event<'a>(&'a mut self) -> Result<Option<Event<'a>>, Error>[src]

Try to fetch the next event from the reader.

Returns

  • Err(_) on error
  • Ok(None) on stream end
  • Ok(Some(_)) on new event

Auto Trait Implementations

impl<R> RefUnwindSafe for Reader<R> where
    R: RefUnwindSafe

impl<R> Send for Reader<R> where
    R: Send

impl<R> Sync for Reader<R> where
    R: Sync

impl<R> Unpin for Reader<R> where
    R: Unpin

impl<R> UnwindSafe for Reader<R> where
    R: UnwindSafe

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.