[][src]Struct fscommon::BufStream

pub struct BufStream<T: Read + Write + Seek> { /* fields omitted */ }

The BufStream struct adds buffering to underlying file or device.

It is basically composition of BufReader and BufWritter. Buffer size is fixed to 512 to avoid dynamic allocation. BufStream automatically flushes itself when being dropped.

Implementations

impl<T: Read + Write + Seek> BufStream<T>[src]

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

Creates a new BufStream object for a given inner stream.

Trait Implementations

impl<T: Read + Write + Seek> BufRead for BufStream<T>[src]

impl<T: Read + Write + Seek> Drop for BufStream<T>[src]

impl<T: Read + Write + Seek> Read for BufStream<T>[src]

impl<T: Read + Write + Seek> Seek for BufStream<T>[src]

impl<T: Read + Write + Seek> Write for BufStream<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for BufStream<T> where
    T: RefUnwindSafe

impl<T> Send for BufStream<T> where
    T: Send

impl<T> Sync for BufStream<T> where
    T: Sync

impl<T> Unpin for BufStream<T> where
    T: Unpin

impl<T> UnwindSafe for BufStream<T> where
    T: 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.