pub enum SpfError {
InvalidSource,
SourceLengthExceeded,
LookupLimitExceeded,
HasNotBeenParsed,
WhiteSpaceSyntaxError,
InvalidSPF,
RedirectWithAllMechanism,
InvalidIPAddr(IpNetworkError),
}
Expand description
A list of expected possible errors for SPF records.
Variants§
InvalidSource
Source is invalid, SPF struct was not created using from_str()
SourceLengthExceeded
Source string length exceeds 255 Characters
LookupLimitExceeded
Exceeds RFC lookup limit.
HasNotBeenParsed
Source Spf String has not been parsed.
WhiteSpaceSyntaxError
Only one white space is permitted between mechanisms.
InvalidSPF
Invalid SPF
RedirectWithAllMechanism
Redirect with All
Mechanism
InvalidIPAddr(IpNetworkError)
Network Address is not valid
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 and Invalid Source error.
sourcepub fn is_source_length_exceeded(&self) -> bool
pub fn is_source_length_exceeded(&self) -> bool
Returns true
if the SpfError indictes source length exceeds 255 characters.
sourcepub fn source_length_exceeded(&self) -> bool
pub fn source_length_exceeded(&self) -> bool
Returns true
if the SpfError indictes 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