[−][src]Struct rocket_multipart_form_data::MultipartFormDataField
The guarder for fields.
Fields
typ: MultipartFormDataType
The type of this field.
field_name: &'a str
The name of this field.
size_limit: u64
The size limit for this field.
content_type: Option<Vec<Mime>>
To filter the content types. It supports stars.
repetition: Repetition
To define this MultipartFormDataField
instance can be used how many times.
Implementations
impl<'a> MultipartFormDataField<'a>
[src]
pub fn text<S: ?Sized + AsRef<str>>(field_name: &S) -> MultipartFormDataField
[src]
Create a text field, the default size_limit is 1 MiB.
pub fn bytes<S: ?Sized + AsRef<str>>(field_name: &S) -> MultipartFormDataField
[src]
Create a raw field, the default size_limit is 1 MiB.
pub fn raw<S: ?Sized + AsRef<str>>(field_name: &S) -> MultipartFormDataField
[src]
Create a raw field, the default size_limit is 1 MiB.
pub fn file<S: ?Sized + AsRef<str>>(field_name: &S) -> MultipartFormDataField
[src]
Create a file field, the default size_limit is 8 MiB.
pub fn size_limit(self, size_limit: u64) -> MultipartFormDataField<'a>
[src]
Set the size_limit for this field.
pub fn content_type(
self,
content_type: Option<Mime>
) -> MultipartFormDataField<'a>
[src]
self,
content_type: Option<Mime>
) -> MultipartFormDataField<'a>
Add a content type filter for this field. This method can be used multiple times to use multiple content type filters.
pub fn content_type_by_string<S: AsRef<str>>(
self,
content_type: Option<S>
) -> Result<MultipartFormDataField<'a>, FromStrError>
[src]
self,
content_type: Option<S>
) -> Result<MultipartFormDataField<'a>, FromStrError>
Add a content type filter for this field. This method can be used multiple times to use multiple content type filters.
pub fn repetition(self, repetition: Repetition) -> MultipartFormDataField<'a>
[src]
Set the repetition for this field.
Trait Implementations
impl<'a> Clone for MultipartFormDataField<'a>
[src]
fn clone(&self) -> MultipartFormDataField<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for MultipartFormDataField<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for MultipartFormDataField<'a>
impl<'a> Send for MultipartFormDataField<'a>
impl<'a> Sync for MultipartFormDataField<'a>
impl<'a> Unpin for MultipartFormDataField<'a>
impl<'a> UnwindSafe for MultipartFormDataField<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,