Struct multipart_stream::parser::ParserBuilder[][src]

pub struct ParserBuilder { /* fields omitted */ }

Implementations

impl ParserBuilder[src]

pub fn new() -> Self[src]

pub fn max_header_bytes(self, max_header_bytes: usize) -> Self[src]

Causes the parser to return error if the headers exceed this byte length. Implementation note: currently this is only checked when about to wait for another chunk. If a single chunk contains a complete header, it may be parsed successfully in spite of exceeding this length.

pub fn max_body_bytes(self, max_body_bytes: usize) -> Self[src]

Causes the parser to return error if the body exceeds this byte length.

pub fn parse<S, E>(
    self,
    input: S,
    boundary: &str
) -> impl Stream<Item = Result<Part, Error>> where
    S: Stream<Item = Result<Bytes, E>>,
    E: Into<Box<dyn Error + Send + Sync>>, 
[src]

Parses a Bytes stream into a Part stream.

boundary should be as in the boundary parameter of the Content-Type header.

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.