[−][src]Enum http_fs::headers::cd::Filename
Filename parameter of Content-Disposition
Variants
Name(Option<String>)Regular filename
Extended(String, Option<String>, Vec<u8>)Extended filename*
Values:
- Charset.
- Optional language tag.
- Raw bytes of name.
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(
charset: String,
lang: Option<String>,
name: Vec<u8>
) -> Self[src]
charset: String,
lang: Option<String>,
name: Vec<u8>
) -> Self
Creates extended file name.
pub fn is_extended(&self) -> bool[src]
Returns whether filename is of extended type.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto 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> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,