pub enum SpfError {
Show 13 variants
InvalidSource,
InvalidVersion,
SourceLengthExceeded,
LookupLimitExceeded,
HasNotBeenParsed,
WhiteSpaceSyntaxError,
InvalidSPF,
RedirectWithAllMechanism,
RedirectNotFinalMechanism,
ModifierMayOccurOnlyOnce(Kind),
InvalidIPAddr(IpNetworkError),
InvalidMechanism(MechanismError),
DeprecatedPtrDetected,
}
Expand description
A list of expected and possible errors for SPF records.
Variants§
InvalidSource
Source is invalid, SPF struct was not created using from_str()
InvalidVersion
Version is invalid
SourceLengthExceeded
Source string length exceeds 512 Characters
LookupLimitExceeded
Exceeds RFC lookup limit.
HasNotBeenParsed
Source Spf String has not been parsed.
WhiteSpaceSyntaxError
Only one white space is permitted between mechanisms or extra whitespace at the end of the spf string.
InvalidSPF
Invalid SPF
RedirectWithAllMechanism
According to RFC7208, ALL REDIRECT MUST be ignored when found with an
‘ALL’ Mechanism, irrespective of relative location.
See Section 5.1
RedirectNotFinalMechanism
REDIRECT SHOULD be the final item given in an Spf record when present.
ModifierMayOccurOnlyOnce(Kind)
Modifiers may only occur once in any Spf Record
InvalidIPAddr(IpNetworkError)
Network Address is not valid
InvalidMechanism(MechanismError)
SpfError for an invalid Mechanism
DeprecatedPtrDetected
Deprecated ptr
detected in Spf record.
According to RFCs ptr
is obsolete and should not be used.
See Section: 5.5
Implementations§
Source§impl SpfError
impl SpfError
Sourcepub fn is_spf_error(&self) -> bool
pub fn is_spf_error(&self) -> bool
Returns true
if the SpfError is any of those listed SpfError
.
Sourcepub fn is_invalid_source(&self) -> bool
pub fn is_invalid_source(&self) -> bool
Returns true
if the SpfError indicates and Invalid Source error.
Sourcepub fn source_is_invalid(&self) -> bool
pub fn source_is_invalid(&self) -> bool
Returns true
if the SpfError indicates an Invalid Source error.
Sourcepub fn version_is_invalid(&self) -> bool
pub fn version_is_invalid(&self) -> bool
Returns true
if the SpfError indicates an invalid version type.
Sourcepub fn is_source_length_exceeded(&self) -> bool
pub fn is_source_length_exceeded(&self) -> bool
Returns true
if the SpfError indicates source length exceeds 255 characters.
Sourcepub fn source_length_exceeded(&self) -> bool
pub fn source_length_exceeded(&self) -> bool
Returns true
if the SpfError indicates source length exceeds 255 characters.
Sourcepub fn is_lookup_limit_exceeded(&self) -> bool
pub fn is_lookup_limit_exceeded(&self) -> bool
Returns true
if the SpfError indicates SPF contains more than 10 DNS lookups.
Sourcepub fn lookup_limit_exceeded(&self) -> bool
pub fn lookup_limit_exceeded(&self) -> bool
Returns true
if the SpfError indicates SPF contains more than 10 DNS lookups.
Sourcepub fn is_has_not_been_parsed(&self) -> bool
pub fn is_has_not_been_parsed(&self) -> bool
Returns true
if the SpfError indicates source of Spf has not been parsed.
Sourcepub fn has_not_been_parsed(&self) -> bool
pub fn has_not_been_parsed(&self) -> bool
Returns true
if the SpfError indicates source of Spf has not been parsed.
Sourcepub fn is_invalid_spf(&self) -> bool
pub fn is_invalid_spf(&self) -> bool
Returns true
if the SpfError indicates this is an invalid Spf Record.
Sourcepub fn is_redirect_with_all_mechanism(&self) -> bool
pub fn is_redirect_with_all_mechanism(&self) -> bool
Returns true
if the SpfError indicates the presents of All
Mechanism
Sourcepub fn is_invalid_ip_addr(&self) -> bool
pub fn is_invalid_ip_addr(&self) -> bool
Returns true
if the SpfError indicates an Invalid IP Address