Enum multipart::server::MultipartData [−][src]
pub enum MultipartData<'a, B: 'a> {
Text(&'a str),
File(MultipartFile<'a, B>),
}The data of a field in a multipart/form-data request.
Variants
Text(&'a str)The field's payload is a text string.
File(MultipartFile<'a, B>)The field's payload is a binary stream (file).
Methods
impl<'a, B> MultipartData<'a, B>[src]
impl<'a, B> MultipartData<'a, B>pub fn as_text(&self) -> Option<&str>[src]
pub fn as_text(&self) -> Option<&str>Borrow this payload as a text field, if possible.
pub fn as_file(&mut self) -> Option<&mut MultipartFile<'a, B>>[src]
pub fn as_file(&mut self) -> Option<&mut MultipartFile<'a, B>>Borrow this payload as a file field, if possible. Mutably borrows so the contents can be read.
Trait Implementations
impl<'a, B: Debug + 'a> Debug for MultipartData<'a, B>[src]
impl<'a, B: Debug + 'a> Debug for MultipartData<'a, B>Auto Trait Implementations
impl<'a, B> Send for MultipartData<'a, B> where
B: Send,
impl<'a, B> Send for MultipartData<'a, B> where
B: Send, impl<'a, B> Sync for MultipartData<'a, B> where
B: Sync,
impl<'a, B> Sync for MultipartData<'a, B> where
B: Sync,