Struct salvo_core::http::form::FilePart
source · pub struct FilePart { /* private fields */ }
Expand description
A file that is to be inserted into a multipart/*
or alternatively an uploaded file that
was received as part of multipart/*
parsing.
Implementations§
source§impl FilePart
impl FilePart
sourcepub fn headers_mut(&mut self) -> &mut HeaderMap
pub fn headers_mut(&mut self) -> &mut HeaderMap
Get headers mutable reference.
sourcepub fn content_type(&self) -> Option<Mime>
pub fn content_type(&self) -> Option<Mime>
Get content type.
sourcepub fn do_not_delete_on_drop(&mut self)
pub fn do_not_delete_on_drop(&mut self)
If you do not want the file on disk to be deleted when Self drops, call this function. It will become your responsibility to clean up.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FilePart
impl RefUnwindSafe for FilePart
impl Send for FilePart
impl Sync for FilePart
impl Unpin for FilePart
impl UnwindSafe for FilePart
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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