#[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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.