Type Alias viz_core::types::Multipart

source ·
pub type Multipart<T = Body> = FormData<T>;
Available on crate feature multipart only.
Expand description

Extracts the data from the multipart body of a request.

Aliased Type§

struct Multipart<T = Body> { /* private fields */ }

Trait Implementations§

source§

impl FromRequest for Multipart

§

type Error = PayloadError

The type returned in the event of a conversion error.
source§

async fn extract(req: &mut Request) -> Result<Self, Self::Error>

Extracts this type from the HTTP Request.
source§

impl<T> Payload for Multipart<T>

source§

const NAME: &'static str = "multipart"

Named the payload.
source§

const LIMIT: u64 = 2_097_152u64

Limited the payload data size, by default 1MB.
source§

fn detect(m: &Mime) -> bool

Detects the payload media type.
source§

fn mime() -> Mime

Specified a media type.
source§

fn limit(limit: Option<u64>) -> u64

Sets the limit size.
source§

fn check_type(m: Option<Mime>) -> Result<Mime, PayloadError>

Detects Content-Type Read more
source§

fn check_length( len: Option<u64>, limit: Option<u64>, ) -> Result<(), PayloadError>

Checks Content-Length Read more
source§

fn check_header( m: Option<Mime>, len: Option<u64>, limit: Option<u64>, ) -> Result<Mime, PayloadError>

Checks Content-Type & Content-Length Read more