[][src]Struct ring_api::multipart::FormFile

pub struct FormFile(_, _);

Describes a file in a multipart form. The first string is the contents of the file, the second is the file name.

Methods

impl FormFile[src]

pub fn with_contents_and_file_name<T, U>(contents: T, file_name: U) -> Self where
    T: Into<String>,
    U: Into<String>, 
[src]

The constructor. First parameter is the file contents, the second is the file name.

pub fn into_contents(self) -> String[src]

Returns the contents, discarding the file name.

pub fn into_file_name(self) -> String[src]

Returns the file name, discarding the contents.

pub fn contents(&self) -> &str[src]

Returns a reference to the contents.

pub fn file_name(&self) -> &str[src]

Returns a reference to the file name.

pub fn set_contents(&mut self, contents: String)[src]

Replaces the contents of this file part with the given argument.

pub fn set_file_name(&mut self, file_name: String)[src]

Replaces the file name of this file part with the given argument.

Trait Implementations

impl PartialEq<FormFile> for FormFile[src]

impl Eq for FormFile[src]

impl Clone for FormFile[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Hash for FormFile[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for FormFile[src]

impl Serialize for FormFile[src]

impl<'de> Deserialize<'de> for FormFile[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err