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]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.