Expand description
This module contains the tools and functions to dealing with Mechanisms found within an Spf DNS record.
The Mechanism struct stores information about the mechanism
or modifier
found in the string representation
of the Spf
record. It contains a number of methods for transversing and accessing this data.
The module also contains a number of ways to create the Mechanism
instances.
ParsedMechanism
- This provides a unified method for parsing any mechanism string. It will either contain a
Mechanism<String>
or aMechanism<IpNetwork>
if the string is successfully parsed.
- This provides a unified method for parsing any mechanism string. It will either contain a
- Both
Mechanism<String>
andMechanism<IpNetwork>
have theFromStr
trait implemented. Allowing for the strings to beparsed()
- The
Mechanism
struct also has a number of specific methods which can be used to create related mechanisms; which are used with theFromStr
trait.
Structs§
Enums§
- Defines the possible mechanisms.
- Error message when unable to construct a new Mechanism.
- Stores the result of a successful parsing of a Mechanism String.
This will either contain aMechanism<String>
orMechanism<IpNetwork>
- Declaration for possible
Qualifier
of a given Mechanism