Struct axum_typed_multipart::FieldData
source · pub struct FieldData<T> {
pub metadata: FieldMetadata,
pub contents: T,
}
Expand description
Wrapper struct that allows to retrieve both the field contents and the additional metadata provided by the client.
This is mainly useful for file uploads but can be used for every field where you need access to the metadata.
If the generic argument implements TryFromField the struct will implement the trait itself.
§Example
use axum_typed_multipart::{FieldData, TryFromMultipart};
#[derive(TryFromMultipart)]
struct Data {
data: FieldData<String>,
}
Fields§
§metadata: FieldMetadata
§contents: T
Trait Implementations§
source§impl<T: TryFromField> TryFromField for FieldData<T>
impl<T: TryFromField> TryFromField for FieldData<T>
Auto Trait Implementations§
impl<T> Freeze for FieldData<T>where
T: Freeze,
impl<T> RefUnwindSafe for FieldData<T>where
T: RefUnwindSafe,
impl<T> Send for FieldData<T>where
T: Send,
impl<T> Sync for FieldData<T>where
T: Sync,
impl<T> Unpin for FieldData<T>where
T: Unpin,
impl<T> UnwindSafe for FieldData<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more