[−][src]Enum http_fs::headers::cd::Filename
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:
- Optional language tag.
- 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
Auto Trait Implementations
impl Unpin for Filename
impl Sync for Filename
impl Send for Filename
impl UnwindSafe for Filename
impl RefUnwindSafe for Filename
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for 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> 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> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,