pub struct AttachmentPolicy { /* private fields */ }Implementations§
Source§impl AttachmentPolicy
impl AttachmentPolicy
pub fn new<I, S>( limits: AttachmentLimits, content_types: I, ) -> Result<Self, AttachmentError>
pub const fn limits(&self) -> AttachmentLimits
pub fn validate_upload( &self, upload: &AttachmentUpload, ) -> Result<ValidatedAttachment, AttachmentError>
pub fn validate_batch( &self, uploads: &[AttachmentUpload], ) -> Result<Vec<ValidatedAttachment>, AttachmentError>
Trait Implementations§
Source§impl Clone for AttachmentPolicy
impl Clone for AttachmentPolicy
Source§fn clone(&self) -> AttachmentPolicy
fn clone(&self) -> AttachmentPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AttachmentPolicy
impl Debug for AttachmentPolicy
impl Eq for AttachmentPolicy
Source§impl PartialEq for AttachmentPolicy
impl PartialEq for AttachmentPolicy
impl StructuralPartialEq for AttachmentPolicy
Auto Trait Implementations§
impl Freeze for AttachmentPolicy
impl RefUnwindSafe for AttachmentPolicy
impl Send for AttachmentPolicy
impl Sync for AttachmentPolicy
impl Unpin for AttachmentPolicy
impl UnsafeUnpin for AttachmentPolicy
impl UnwindSafe for AttachmentPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.