Enum decon_spf::mechanism::Kind [−][src]
pub enum Kind {
Redirect,
A,
MX,
Include,
IpV4,
IpV6,
Ptr,
Exists,
All,
}
Expand description
Defines the possible mechanisms.
Variants
Redirect
Represents a Modifier of type redirect=
If this is present, the All mechanism should not be present.
A
MX
Represents a Mechanism of type MX
Possible values follow the same loyout as for A
Include
Represents a Mechanism of type Include
include:<domain>
IpV4
IpV6
Represents a Mechanism of type ip6
Ptr
Exists
Represents a Mechanism of type exists
ptr
ptr:<domain>
All
Represents a Mechanism of type All
Implementations
Returns true
if the mechanism is Redirect
.
Returns true
if the mechanism is Include
.
Returns true
if it is of any ip. V4 or V6
Examples:
let ip4 = Kind::IpV4;
let ip6 = Kind::IpV6;
assert_eq!(ip4.is_ip_v4(), true);
assert_eq!(ip4.is_ip_v6(), false);
assert_eq!(ip4.is_ip(), true);
assert_eq!(ip6.is_ip_v6(), true);
assert_eq!(ip6.is_ip_v4(), false);
assert_eq!(ip6.is_ip(), true);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Kind
impl UnwindSafe for Kind
Blanket Implementations
Mutably borrows from an owned value. Read more