Struct rouille::input::post::BufferedFile
[−]
[src]
pub struct BufferedFile { pub data: Vec<u8>, pub mime: String, pub filename: Option<String>, }
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
impl Clone for BufferedFile
[src]
fn clone(&self) -> BufferedFile
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for BufferedFile
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl DecodePostField<()> for BufferedFile
[src]
fn from_field(_: (), _: &str) -> Result<Self, PostFieldError>
Called when a field with the given name is found in the POST input. Read more
fn from_file<R>(_: (),
file: R,
filename: Option<&str>,
mime: &str)
-> Result<Self, PostFieldError> where R: BufRead
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
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
fn not_found(_: Config) -> Result<Self, PostFieldError> where Self: Sized
Called when no field is found in the POST input. Read more