pub enum MtaStsError {
NotAnStsRecord,
MissingId,
MissingField(&'static str),
UnsupportedVersion(String),
InvalidMode(String),
InvalidMaxAge(String),
IdTooLong(usize),
}Expand description
Errors returned by mailrs-mta-sts parsers.
Variants§
NotAnStsRecord
TXT record didn’t start with v=STSv1.
MissingId
TXT record missing the required id= tag.
MissingField(&'static str)
Policy file missing a required field (version, mode, mx, or max_age).
UnsupportedVersion(String)
version field was not STSv1.
InvalidMode(String)
mode value was not one of enforce|testing|none.
InvalidMaxAge(String)
max_age not a non-negative integer.
IdTooLong(usize)
id value too long (max 32 chars per RFC 8461 §3.1).
Trait Implementations§
Source§impl Clone for MtaStsError
impl Clone for MtaStsError
Source§fn clone(&self) -> MtaStsError
fn clone(&self) -> MtaStsError
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 MtaStsError
impl Debug for MtaStsError
Source§impl Display for MtaStsError
impl Display for MtaStsError
Source§impl Error for MtaStsError
impl Error for MtaStsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for MtaStsError
impl PartialEq for MtaStsError
Source§fn eq(&self, other: &MtaStsError) -> bool
fn eq(&self, other: &MtaStsError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MtaStsError
impl StructuralPartialEq for MtaStsError
Auto Trait Implementations§
impl Freeze for MtaStsError
impl RefUnwindSafe for MtaStsError
impl Send for MtaStsError
impl Sync for MtaStsError
impl Unpin for MtaStsError
impl UnsafeUnpin for MtaStsError
impl UnwindSafe for MtaStsError
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