#[non_exhaustive]pub enum PartKind {
Field,
File,
}Expand description
Whether a part is a text field or a file.
§Examples
let mp = form_net::parse_multipart(b"multipart/form-data; boundary=X", body)?;
assert_eq!(mp.parts()[0].kind(), form_net::PartKind::Field);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.
Field
A text field: no filename parameter.
File
A file: a filename parameter (even an empty one) or an accepted
filename*.
Trait Implementations§
impl Copy for PartKind
impl Eq for PartKind
impl StructuralPartialEq for PartKind
Auto Trait Implementations§
impl Freeze for PartKind
impl RefUnwindSafe for PartKind
impl Send for PartKind
impl Sync for PartKind
impl Unpin for PartKind
impl UnsafeUnpin for PartKind
impl UnwindSafe for PartKind
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