pub struct Config {
use_std3_ascii_rules: bool,
transitional_processing: bool,
verify_dns_length: bool,
check_hyphens: bool,
}
Expand description
Deprecated configuration API.
Fields§
§use_std3_ascii_rules: bool
transitional_processing: bool
verify_dns_length: bool
check_hyphens: bool
Implementations§
source§impl Config
impl Config
sourcepub fn use_std3_ascii_rules(self, value: bool) -> Self
pub fn use_std3_ascii_rules(self, value: bool) -> Self
Whether to enforce STD3 or WHATWG URL Standard ASCII deny list.
true
for STD3, false
for no deny list.
Note that true
rejects pseudo-hosts used by various TXT record-based protocols.
sourcepub fn transitional_processing(self, value: bool) -> Self
pub fn transitional_processing(self, value: bool) -> Self
Whether to enable (deprecated) transitional processing.
Note that Firefox, Safari, and Chrome do not use transitional processing.
sourcepub fn verify_dns_length(self, value: bool) -> Self
pub fn verify_dns_length(self, value: bool) -> Self
Whether the VerifyDNSLength operation should be performed
by to_ascii
.
For compatibility with previous behavior, even when set to true
,
the trailing root label dot is allowed contrary to the spec.
sourcepub fn check_hyphens(self, value: bool) -> Self
pub fn check_hyphens(self, value: bool) -> Self
Whether to enforce STD3 rules for hyphen placement.
true
to deny hyphens in the first and last positions.
false
to not enforce hyphen placement.
Note that for backward compatibility this is not the same as UTS 46 CheckHyphens, which also disallows hyphens in the third and fourth positions.
Note that true
rejects real-world names, including some GitHub user pages.
sourcepub fn use_idna_2008_rules(self, value: bool) -> Self
pub fn use_idna_2008_rules(self, value: bool) -> Self
Obsolete method retained to ease migration. The argument must be false
.
Panics
If the argument is true
.
sourcefn deny_list(&self) -> AsciiDenyList
fn deny_list(&self) -> AsciiDenyList
Compute the deny list
Trait Implementations§
source§impl Default for Config
impl Default for Config
The defaults are that of beStrict=false in the WHATWG URL Standard