#[non_exhaustive]pub enum DispositionType<'a> {
Inline,
Attachment,
FormData,
Other(&'a [u8]),
}Expand description
The disposition type.
§Examples
use parse_net::{parse_content_disposition, DispositionType};
assert_eq!(parse_content_disposition(b"INLINE")?.kind(), DispositionType::Inline);
assert_eq!(parse_content_disposition(b"x-custom")?.kind(), DispositionType::Other(&b"x-custom"[..]));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
inline.
Attachment
attachment.
FormData
form-data (RFC 7578).
Other(&'a [u8])
Another type token, as sent. RFC 6266 section 4.2: treat an unknown
type as attachment.
Trait Implementations§
Source§impl<'a> Clone for DispositionType<'a>
impl<'a> Clone for DispositionType<'a>
impl<'a> Copy for DispositionType<'a>
Source§impl<'a> Debug for DispositionType<'a>
impl<'a> Debug for DispositionType<'a>
impl<'a> Eq for DispositionType<'a>
Source§impl<'a> Hash for DispositionType<'a>
impl<'a> Hash for DispositionType<'a>
Source§impl<'a> PartialEq for DispositionType<'a>
impl<'a> PartialEq for DispositionType<'a>
impl<'a> StructuralPartialEq for DispositionType<'a>
Auto Trait Implementations§
impl<'a> Freeze for DispositionType<'a>
impl<'a> RefUnwindSafe for DispositionType<'a>
impl<'a> Send for DispositionType<'a>
impl<'a> Sync for DispositionType<'a>
impl<'a> Unpin for DispositionType<'a>
impl<'a> UnsafeUnpin for DispositionType<'a>
impl<'a> UnwindSafe for DispositionType<'a>
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