[][src]Struct iobuffer::IoBuffer

pub struct IoBuffer { /* fields omitted */ }

Simple object which implements both std::io::Write and std::io::Read. Uses an internal buffer. Thread-safe and cloneable.


impl IoBuffer[src]

pub fn new() -> Self[src]

Create a new empty buffer.

impl IoBuffer[src]

pub fn read_full_line(&mut self, terminator: u8) -> Option<Vec<u8>>[src]

Read a full line (terminated by the indicated byte), if any. Any partial line is left unread. The terminator is not included in the result.

pub fn lines(&mut self) -> impl Iterator<Item = Vec<u8>>[src]

Iterator of full lines (as returned by read_full_line).

Trait Implementations

impl Clone for IoBuffer[src]

impl Default for IoBuffer[src]

impl Read for IoBuffer[src]

impl Write for IoBuffer[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.