Trait actix_multipart::form::FieldReader
source · pub trait FieldReader<'t>: Sized + Any {
type Future: Future<Output = Result<Self, MultipartError>>;
// Required method
fn read_field(
req: &'t HttpRequest,
field: Field,
limits: &'t mut Limits
) -> Self::Future;
}
Expand description
Trait that data types to be used in a multipart form struct should implement.
It represents an asynchronous handler that processes a multipart field to produce Self
.
Required Associated Types§
sourcetype Future: Future<Output = Result<Self, MultipartError>>
type Future: Future<Output = Result<Self, MultipartError>>
Future that resolves to a Self
.
Required Methods§
sourcefn read_field(
req: &'t HttpRequest,
field: Field,
limits: &'t mut Limits
) -> Self::Future
fn read_field( req: &'t HttpRequest, field: Field, limits: &'t mut Limits ) -> Self::Future
The form will call this function to handle the field.
Object Safety§
This trait is not object safe.
Implementors§
source§impl<'t> FieldReader<'t> for Bytes
impl<'t> FieldReader<'t> for Bytes
source§impl<'t> FieldReader<'t> for TempFile
Available on crate feature tempfile
only.
impl<'t> FieldReader<'t> for TempFile
Available on crate feature
tempfile
only.