pub struct AttachmentCompressor;Expand description
Compression utilities for email attachments
Implementations§
Source§impl AttachmentCompressor
impl AttachmentCompressor
Sourcepub fn compress_if_beneficial(
attachment: &mut Attachment,
config: &AttachmentConfig,
) -> Result<(), EmailError>
pub fn compress_if_beneficial( attachment: &mut Attachment, config: &AttachmentConfig, ) -> Result<(), EmailError>
Compress an attachment if beneficial
Sourcepub fn estimate_compression_ratio(attachment: &Attachment) -> f64
pub fn estimate_compression_ratio(attachment: &Attachment) -> f64
Get compression ratio estimate for an attachment
Auto Trait Implementations§
impl Freeze for AttachmentCompressor
impl RefUnwindSafe for AttachmentCompressor
impl Send for AttachmentCompressor
impl Sync for AttachmentCompressor
impl Unpin for AttachmentCompressor
impl UnwindSafe for AttachmentCompressor
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