pub struct UploadHead { /* private fields */ }Expand description
An upload that begins: the field it is for, and what the client declared about it, which must not be trusted.
Implementations§
Source§impl UploadHead
impl UploadHead
Sourcepub fn path(&self) -> &FieldPath
pub fn path(&self) -> &FieldPath
The declared field the upload is for, with its index when the field is an array.
Sourcepub fn untrusted_filename(&self) -> &str
pub fn untrusted_filename(&self) -> &str
The filename the client declared, which is not empty, since an empty filename means no file was chosen. It can contain any character, as Upload’s documentation describes, and must not be used as a local path, or written into another syntax, without checking or encoding it.
Sourcepub fn untrusted_media_type(&self) -> Option<&MediaType>
pub fn untrusted_media_type(&self) -> Option<&MediaType>
The media type the client declared, which the field’s accept allowed, but need not describe the content.
Trait Implementations§
Source§impl Clone for UploadHead
impl Clone for UploadHead
Source§impl Debug for UploadHead
Shows the path and the filename’s length, since the filename and media type are submitted content.
impl Debug for UploadHead
Shows the path and the filename’s length, since the filename and media type are submitted content.
impl Eq for UploadHead
Source§impl PartialEq for UploadHead
impl PartialEq for UploadHead
impl StructuralPartialEq for UploadHead
Auto Trait Implementations§
impl Forget for UploadHead
impl Freeze for UploadHead
impl RefUnwindSafe for UploadHead
impl Send for UploadHead
impl Sync for UploadHead
impl Unpin for UploadHead
impl UnsafeUnpin for UploadHead
impl UnwindSafe for UploadHead
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