pub struct BufferedFile {
pub data: Vec<u8>,
pub mime: String,
pub filename: Option<String>,
}
Expand description
Implementation of the DecodePostField
that puts the body of the file in memory.
Fields§
§data: Vec<u8>
The file’s data.
mime: String
The MIME type. Remember that this shouldn’t be blindly trusted.
filename: Option<String>
The name of the file, if known. Remember that this shouldn’t be blindly trusted.
Trait Implementations§
Source§impl Clone for BufferedFile
impl Clone for BufferedFile
Source§fn clone(&self) -> BufferedFile
fn clone(&self) -> BufferedFile
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BufferedFile
impl Debug for BufferedFile
Source§impl DecodePostField<()> for BufferedFile
impl DecodePostField<()> for BufferedFile
Source§fn from_field(_: (), _: &str) -> Result<Self, PostFieldError>
fn from_field(_: (), _: &str) -> Result<Self, PostFieldError>
Called when a field with the given name is found in the POST input. Read more
Source§fn from_file<R>(
_: (),
file: R,
filename: Option<&str>,
mime: &str,
) -> Result<Self, PostFieldError>where
R: BufRead,
fn from_file<R>(
_: (),
file: R,
filename: Option<&str>,
mime: &str,
) -> Result<Self, PostFieldError>where
R: BufRead,
Called when a file with the given name is found in the POST input. Read more
Source§fn merge_multiple(self, _existing: Self) -> Result<Self, PostFieldError>where
Self: Sized,
fn merge_multiple(self, _existing: Self) -> Result<Self, PostFieldError>where
Self: Sized,
When multiple fields with the same name are found in the client’s input, rouille will build
an object for each of them and then merge them with this method. Read more
Auto Trait Implementations§
impl Freeze for BufferedFile
impl RefUnwindSafe for BufferedFile
impl Send for BufferedFile
impl Sync for BufferedFile
impl Unpin for BufferedFile
impl UnwindSafe for BufferedFile
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