#[non_exhaustive]pub enum ExtendedFilenamePolicy {
Refuse,
AcceptAlone,
Ignore,
}Expand description
What a filename* parameter (RFC 8187) in a part means. Browsers never
send it; RFC 7578 forbids senders from using it.
Both filename and filename* in one part are refused under every
policy.
§Examples
use form_net::{ExtendedFilenamePolicy, Policy};
let accept = Policy::DEFAULT.with_extended_filename(ExtendedFilenamePolicy::AcceptAlone);
assert_eq!(Policy::DEFAULT.extended_filename, ExtendedFilenamePolicy::Refuse);
assert_ne!(accept, Policy::DEFAULT);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.
Refuse
Refuse any filename* (default).
AcceptAlone
Accept and decode it (UTF-8 only) when it is the only file name.
Ignore
Drop it; a part with only filename* is then a text field.
Trait Implementations§
Source§impl Clone for ExtendedFilenamePolicy
impl Clone for ExtendedFilenamePolicy
impl Copy for ExtendedFilenamePolicy
Source§impl Debug for ExtendedFilenamePolicy
impl Debug for ExtendedFilenamePolicy
impl Eq for ExtendedFilenamePolicy
Source§impl PartialEq for ExtendedFilenamePolicy
impl PartialEq for ExtendedFilenamePolicy
impl StructuralPartialEq for ExtendedFilenamePolicy
Auto Trait Implementations§
impl Freeze for ExtendedFilenamePolicy
impl RefUnwindSafe for ExtendedFilenamePolicy
impl Send for ExtendedFilenamePolicy
impl Sync for ExtendedFilenamePolicy
impl Unpin for ExtendedFilenamePolicy
impl UnsafeUnpin for ExtendedFilenamePolicy
impl UnwindSafe for ExtendedFilenamePolicy
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