[][src]Enum body_image::BodyReader

pub enum BodyReader<'a> {
    Contiguous(Cursor<&'a [u8]>),
    Scattered(GatheringReader<'a, Bytes>),
    FileSlice(ReadSlice),
}

Provides a Read reference for a BodyImage in any state.

Variants

Contiguous(Cursor<&'a [u8]>)

Cursor over a contiguous single RAM buffer, from Ram or MemMap. Also used for the empty case. Cursor::into_inner may be used for direct access to the memory byte slice.

Scattered(GatheringReader<'a, Bytes>)

GatheringReader providing Read over 2 or more scattered RAM buffers.

FileSlice(ReadSlice)

ReadSlice providing instance independent, unbuffered Read and Seek for BodyImage FsRead state, limited to a range within an underlying file. Consider wrapping this in std::io::BufReader if performing many small reads.

Trait Implementations

impl<'a> Read for BodyReader<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for BodyReader<'a>

impl<'a> Send for BodyReader<'a>

impl<'a> Sync for BodyReader<'a>

impl<'a> Unpin for BodyReader<'a>

impl<'a> UnwindSafe for BodyReader<'a>

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,