pub struct AttachmentConfig {
pub max_size: usize,
pub max_total_size: usize,
pub max_count: usize,
pub allowed_types: Vec<String>,
pub blocked_types: Vec<String>,
pub auto_compress: bool,
pub compression_quality: Option<u8>,
}Expand description
Attachment configuration
Fields§
§max_size: usizeMaximum attachment size in bytes (default 25MB)
max_total_size: usizeMaximum total attachments size per email (default 50MB)
max_count: usizeMaximum number of attachments per email
allowed_types: Vec<String>Allowed MIME types (empty means all allowed)
blocked_types: Vec<String>Blocked MIME types
auto_compress: boolEnable automatic compression for supported types
compression_quality: Option<u8>Compression quality (0-100, only for images)
Trait Implementations§
Source§impl Clone for AttachmentConfig
impl Clone for AttachmentConfig
Source§fn clone(&self) -> AttachmentConfig
fn clone(&self) -> AttachmentConfig
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 AttachmentConfig
impl Debug for AttachmentConfig
Source§impl Default for AttachmentConfig
impl Default for AttachmentConfig
Source§impl<'de> Deserialize<'de> for AttachmentConfig
impl<'de> Deserialize<'de> for AttachmentConfig
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 AttachmentConfig
impl RefUnwindSafe for AttachmentConfig
impl Send for AttachmentConfig
impl Sync for AttachmentConfig
impl Unpin for AttachmentConfig
impl UnwindSafe for AttachmentConfig
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