[][src]Struct kayrx::web::multipart::dev::PayloadBuffer

pub struct PayloadBuffer {
    pub eof: bool,
    pub buf: BytesMut,
    // some fields omitted
}

Payload buffer

Fields

eof: boolbuf: BytesMut

Methods

impl PayloadBuffer[src]

pub fn new<S>(stream: S) -> Self where
    S: Stream<Item = Result<Bytes, PayloadError>> + 'static, 
[src]

Create new PayloadBuffer instance

pub fn poll_stream(&mut self, cx: &mut Context) -> Result<(), PayloadError>[src]

pub fn read_exact(&mut self, size: usize) -> Option<Bytes>[src]

Read exact number of bytes

pub fn read_max(&mut self, size: u64) -> Result<Option<Bytes>, MultipartError>[src]

pub fn read_until(
    &mut self,
    line: &[u8]
) -> Result<Option<Bytes>, MultipartError>
[src]

Read until specified ending

pub fn readline(&mut self) -> Result<Option<Bytes>, MultipartError>[src]

Read bytes until new line delimiter

pub fn readline_or_eof(&mut self) -> Result<Option<Bytes>, MultipartError>[src]

Read bytes until new line delimiter or eof

pub fn unprocessed(&mut self, data: Bytes)[src]

Put unprocessed data back to the buffer

Auto Trait Implementations

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>,