#[non_exhaustive]pub enum ContentDispositionType {
Inline,
Attachment,
}
Expand description
A disposition type in the Content-Disposition
HTTP header as defined in Section 4.2 of RFC
6266.
This type can hold an arbitrary TokenString
. To build this with a custom value, convert it
from a TokenString
with ::from()
/ .into()
. To check for values that are not available as
a documented variant here, use its string representation, obtained through
.as_str()
.
Comparisons with other string types are done case-insensitively.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Inline
The content can be displayed.
This is the default.
Attachment
The content should be downloaded instead of displayed.
Implementations§
Source§impl ContentDispositionType
impl ContentDispositionType
Sourcepub fn parse(s: &str) -> Result<Self, TokenStringParseError>
pub fn parse(s: &str) -> Result<Self, TokenStringParseError>
Try parsing a &str
into a ContentDispositionType
.
Trait Implementations§
Source§impl AsRef<str> for ContentDispositionType
impl AsRef<str> for ContentDispositionType
Source§impl Clone for ContentDispositionType
impl Clone for ContentDispositionType
Source§fn clone(&self) -> ContentDispositionType
fn clone(&self) -> ContentDispositionType
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ContentDispositionType
impl Debug for ContentDispositionType
Source§impl Default for ContentDispositionType
impl Default for ContentDispositionType
Source§fn default() -> ContentDispositionType
fn default() -> ContentDispositionType
Returns the “default value” for a type. Read more
Source§impl Display for ContentDispositionType
impl Display for ContentDispositionType
Source§impl From<TokenString> for ContentDispositionType
impl From<TokenString> for ContentDispositionType
Source§fn from(value: TokenString) -> Self
fn from(value: TokenString) -> Self
Converts to this type from the input type.
Source§impl FromStr for ContentDispositionType
impl FromStr for ContentDispositionType
Source§impl Ord for ContentDispositionType
impl Ord for ContentDispositionType
Source§impl<'a> PartialEq<&'a str> for ContentDispositionType
impl<'a> PartialEq<&'a str> for ContentDispositionType
Source§impl PartialEq for ContentDispositionType
impl PartialEq for ContentDispositionType
Source§impl PartialOrd for ContentDispositionType
impl PartialOrd for ContentDispositionType
Source§impl<'a> TryFrom<&'a [u8]> for ContentDispositionType
impl<'a> TryFrom<&'a [u8]> for ContentDispositionType
impl Eq for ContentDispositionType
Auto Trait Implementations§
impl Freeze for ContentDispositionType
impl RefUnwindSafe for ContentDispositionType
impl Send for ContentDispositionType
impl Sync for ContentDispositionType
impl Unpin for ContentDispositionType
impl UnwindSafe for ContentDispositionType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.