pub enum XDNSPrefetchControl {
Off,
On,
}
Expand description
Manages X-DNS-Prefetch-Control
header
The X-DNS-Prefetch-Control HTTP response header controls DNS prefetching, a feature by which browsers proactively perform domain name resolution on both links that the user may choose to follow as well as URLs for items referenced by the document, including images, CSS, JavaScript, and so forth.
§Values
- off: Disable DNS prefetching.
- on: Enable DNS prefetching, allowing the browser to proactively perform domain name resolution on both links that the user may choose to follow as well as URLs for items referenced by the document, including images, CSS, JavaScript, and so forth.
§Examples
use helmet_core::XDNSPrefetchControl;
let x_dns_prefetch_control = XDNSPrefetchControl::off();
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for XDNSPrefetchControl
impl Clone for XDNSPrefetchControl
Source§fn clone(&self) -> XDNSPrefetchControl
fn clone(&self) -> XDNSPrefetchControl
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Display for XDNSPrefetchControl
impl Display for XDNSPrefetchControl
Auto Trait Implementations§
impl Freeze for XDNSPrefetchControl
impl RefUnwindSafe for XDNSPrefetchControl
impl Send for XDNSPrefetchControl
impl Sync for XDNSPrefetchControl
impl Unpin for XDNSPrefetchControl
impl UnwindSafe for XDNSPrefetchControl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more