Module decon_spf::mechanism

source ·
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 a Mechanism<IpNetwork> if the string is successfully parsed.
  • Both Mechanism<String> and Mechanism<IpNetwork> have the FromStr trait implemented. Allowing for the strings to be parsed()
  • The Mechanism struct also has a number of specific methods which can be used to create related mechanisms; which are used with the FromStr 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 a Mechanism<String> or Mechanism<IpNetwork>
  • Declaration for possible Qualifier of a given Mechanism