pub struct UploadConfig {
pub allowed_types: String,
pub max_file_size: u64,
pub upload_dir: String,
pub temp_dir: String,
}Fields§
§allowed_types: String允许的文件类型 (MIME types, 逗号分隔)
max_file_size: u64最大文件大小 (MB)
upload_dir: String上传目录
temp_dir: String临时目录
Implementations§
Source§impl UploadConfig
impl UploadConfig
pub fn allowed_types_list(&self) -> Vec<String>
pub fn max_file_size_bytes(&self) -> u64
Trait Implementations§
Source§impl Clone for UploadConfig
impl Clone for UploadConfig
Source§fn clone(&self) -> UploadConfig
fn clone(&self) -> UploadConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UploadConfig
impl Debug for UploadConfig
Source§impl Default for UploadConfig
impl Default for UploadConfig
Source§impl<'de> Deserialize<'de> for UploadConfig
impl<'de> Deserialize<'de> for UploadConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UploadConfig
impl RefUnwindSafe for UploadConfig
impl Send for UploadConfig
impl Sync for UploadConfig
impl Unpin for UploadConfig
impl UnwindSafe for UploadConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)