pub enum MailError {
Encoding(EncodingError),
Type(HeaderTypeError),
Component(ComponentCreationError),
Validation(HeaderValidationError),
ResourceLoading(ResourceLoadingError),
}
Expand description
General Error combining most other error wrt. mail creation and encoding.
Variants§
Encoding(EncodingError)
Encoding the mail failed.
Type(HeaderTypeError)
Different implementations for the same header where mixed up.
Component(ComponentCreationError)
Creating a mail header body (component) failed.
Validation(HeaderValidationError)
The mail has some invalid header or header combinations.
E.g. it has a From
header with multiple mailboxes but no
Sender
header (which is only required if From
has more
than one mailbox).
ResourceLoading(ResourceLoadingError)
Loading an resource failed.
E.g. the file to attach or the image to embedded could not be found.
Trait Implementations§
Source§impl Fail for MailError
impl Fail for MailError
Source§fn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moreSource§impl From<BuildInValidationError> for MailError
impl From<BuildInValidationError> for MailError
Source§fn from(err: BuildInValidationError) -> Self
fn from(err: BuildInValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ComponentCreationError> for MailError
impl From<ComponentCreationError> for MailError
Source§fn from(err: ComponentCreationError) -> Self
fn from(err: ComponentCreationError) -> Self
Converts to this type from the input type.
Source§impl From<EncodingError> for MailError
impl From<EncodingError> for MailError
Source§fn from(err: EncodingError) -> Self
fn from(err: EncodingError) -> Self
Converts to this type from the input type.
Source§impl From<HeaderTypeError> for MailError
impl From<HeaderTypeError> for MailError
Source§fn from(err: HeaderTypeError) -> Self
fn from(err: HeaderTypeError) -> Self
Converts to this type from the input type.
Source§impl From<HeaderValidationError> for MailError
impl From<HeaderValidationError> for MailError
Source§fn from(err: HeaderValidationError) -> Self
fn from(err: HeaderValidationError) -> Self
Converts to this type from the input type.
Source§impl From<OtherValidationError> for MailError
impl From<OtherValidationError> for MailError
Source§fn from(oe: OtherValidationError) -> Self
fn from(oe: OtherValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ResourceError> for MailError
impl From<ResourceError> for MailError
Source§fn from(err: ResourceError) -> Self
fn from(err: ResourceError) -> Self
Converts to this type from the input type.
Source§impl From<ResourceLoadingError> for MailError
impl From<ResourceLoadingError> for MailError
Source§fn from(err: ResourceLoadingError) -> Self
fn from(err: ResourceLoadingError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for MailError
impl !RefUnwindSafe for MailError
impl Send for MailError
impl Sync for MailError
impl Unpin for MailError
impl !UnwindSafe for MailError
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