[][src]Struct layered_io::LayeredReader

pub struct LayeredReader<Inner> { /* fields omitted */ }

Adapts an Read to implement ReadLayered.

Implementations

impl<Inner: Read> LayeredReader<Inner>[src]

pub fn new(inner: Inner) -> Self[src]

Construct a new LayeredReader which wraps inner with default settings.

pub fn with_eos_as_push(inner: Inner) -> Self[src]

Construct a new LayeredReader which wraps inner. When inner reports end of stream (by returning 0), report a push but keep the stream open and continue to read data on it.

For example, when reading a file, when the reader reaches the end of the file it will report it, but consumers may wish to continue reading in case additional data is appended to the file.

pub fn line_by_line(inner: Inner) -> Self[src]

Construct a new LayeredReader which wraps an inner which reads its input line-by-line, such as stdin on a terminal.

pub fn abandon_into_inner(self) -> Option<Inner>[src]

Consume this LayeredReader and return the inner stream.

Trait Implementations

impl<Inner: Read + AsRawFd> AsRawFd for LayeredReader<Inner>[src]

impl<Inner> Bufferable for LayeredReader<Inner>[src]

impl<Inner: Debug> Debug for LayeredReader<Inner>[src]

impl<Inner: Read> Read for LayeredReader<Inner>[src]

impl<Inner: Read> ReadLayered for LayeredReader<Inner>[src]

Auto Trait Implementations

impl<Inner> RefUnwindSafe for LayeredReader<Inner> where
    Inner: RefUnwindSafe
[src]

impl<Inner> Send for LayeredReader<Inner> where
    Inner: Send
[src]

impl<Inner> Sync for LayeredReader<Inner> where
    Inner: Sync
[src]

impl<Inner> Unpin for LayeredReader<Inner> where
    Inner: Unpin
[src]

impl<Inner> UnwindSafe for LayeredReader<Inner> where
    Inner: UnwindSafe
[src]

Blanket Implementations

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

impl<T> AsUnsafeFile for T where
    T: AsRawFd
[src]

impl<T> AsUnsafeHandle for T where
    T: AsRawFd
[src]

impl<T> AsUnsafeSocket for T where
    T: AsRawFd
[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.