Struct viaspf::ConfigBuilder [−][src]
pub struct ConfigBuilder { /* fields omitted */ }
Expand description
A builder for SPF query configurations.
Implementations
The maximum number of void lookups allowed. The default is 2.
The duration until a query times out. The default is 20 seconds.
This is not an accurate, enforced timeout. Rather, the duration is the
minimum amount of time until the library may detect a timeout. If a
Lookup
implementation itself uses a much longer timeout duration, then
the timeout condition will not be detected until after that timeout has
passed. The time elapsed is checked on every attempt to perform DNS
resolution.
The explain string from which to compute the default explanation when a
Fail
result is returned. The default value is the empty string.
When the given ExplainString
is evaluated, it is expanded strictly
locally, without access to the network. Specifically, the %{p}
macro
therefore always expands to the default value unknown
.
pub fn modify_exp_with<F>(self, f: F) -> Self where
F: Fn(&mut ExplainString) + Send + Sync + 'static,
pub fn modify_exp_with<F>(self, f: F) -> Self where
F: Fn(&mut ExplainString) + Send + Sync + 'static,
The function to apply to explain strings originating from the DNS via an exp modifier.
This function serves as a callback that allows sanitising or otherwise
altering the third-party-provided explain string before it undergoes
macro expansion. An example use would be prepending a macro string such
as "%{o} explains: "
.
The hostname of the SPF verifier.
This is substituted for the %{r}
macro during macro expansion. The
given string is used as-is, without validation or transformation.
Whether to capture a trace during query execution.
Note: Enabling tracing has a cost, as the data structures encountered during processing are copied and aggregated in the trace.
Trait Implementations
Performs the conversion.