pub struct FileConstraints {
pub max_size: u64,
pub allowed_types: Option<Vec<Mime>>,
pub require_hash: bool,
}
Expand description
File validation constraints
Fields§
§max_size: u64
Maximum file size in bytes (default: 10MB)
allowed_types: Option<Vec<Mime>>
Allowed MIME types (None = allow all)
require_hash: bool
Require hash verification
Trait Implementations§
Source§impl Clone for FileConstraints
impl Clone for FileConstraints
Source§fn clone(&self) -> FileConstraints
fn clone(&self) -> FileConstraints
Returns a duplicate 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 FileConstraints
impl Debug for FileConstraints
Auto Trait Implementations§
impl Freeze for FileConstraints
impl RefUnwindSafe for FileConstraints
impl Send for FileConstraints
impl Sync for FileConstraints
impl Unpin for FileConstraints
impl UnwindSafe for FileConstraints
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