[][src]Enum http_fs::headers::cd::Filename

pub enum Filename {
    Name(Option<String>),
    Extended(Option<String>, String),
}

Filename parameter of Content-Disposition

Variants

Name(Option<String>)

Regular filename

Extended(Option<String>, String)

Extended filename*

Charset is always UTF-8, because whatelse you need?

Values:

  1. Optional language tag.
  2. Correctly percent encoded string

Methods

impl Filename[src]

pub fn new() -> Self[src]

Returns default Filename with empty name field.

pub fn with_name(name: String) -> Self[src]

Creates file name.

pub fn with_encoded_name(name: Cow<str>) -> Self[src]

Creates file name, and checks whether it should be encoded.

Note that actual encoding would happen only when header is written. The value itself would remain unchanged in the Filename.

pub fn with_extended(lang: Option<String>, name: String) -> Self[src]

Creates extended file name.

pub fn is_extended(&self) -> bool[src]

Returns whether filename is of extended type.

Trait Implementations

impl Debug for Filename[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T