Skip to main content

TryFromMultipartWithState

Trait TryFromMultipartWithState 

Source
pub trait TryFromMultipartWithState<S: Send + Sync>: Sized {
    // Required method
    fn try_from_multipart_with_state(
        multipart: &mut Multipart,
        state: &S,
    ) -> impl Future<Output = Result<Self, TypedMultipartError>> + Send;
}
Expand description

Parse a full multipart request body into a struct.

Typically generated by #[derive(Multipart)]. Each field in the struct is matched against multipart field names and parsed via TryFromFieldWithState.

Required Methods§

Source

fn try_from_multipart_with_state( multipart: &mut Multipart, state: &S, ) -> impl Future<Output = Result<Self, TypedMultipartError>> + Send

Parse the multipart stream into Self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§