#[non_exhaustive]pub struct ResponseHeadersPolicyXssProtectionBuilder { /* private fields */ }Expand description
A builder for ResponseHeadersPolicyXssProtection.
Implementations§
source§impl ResponseHeadersPolicyXssProtectionBuilder
impl ResponseHeadersPolicyXssProtectionBuilder
sourcepub fn override(self, input: bool) -> Self
pub fn override(self, input: bool) -> Self
A Boolean that determines whether CloudFront overrides the X-XSS-Protection HTTP response header received from the origin with the one specified in this response headers policy.
sourcepub fn set_override(self, input: Option<bool>) -> Self
pub fn set_override(self, input: Option<bool>) -> Self
A Boolean that determines whether CloudFront overrides the X-XSS-Protection HTTP response header received from the origin with the one specified in this response headers policy.
sourcepub fn get_override(&self) -> &Option<bool>
pub fn get_override(&self) -> &Option<bool>
A Boolean that determines whether CloudFront overrides the X-XSS-Protection HTTP response header received from the origin with the one specified in this response headers policy.
sourcepub fn protection(self, input: bool) -> Self
pub fn protection(self, input: bool) -> Self
A Boolean that determines the value of the X-XSS-Protection HTTP response header. When this setting is true, the value of the X-XSS-Protection header is 1. When this setting is false, the value of the X-XSS-Protection header is 0.
For more information about these settings, see X-XSS-Protection in the MDN Web Docs.
This field is required.sourcepub fn set_protection(self, input: Option<bool>) -> Self
pub fn set_protection(self, input: Option<bool>) -> Self
A Boolean that determines the value of the X-XSS-Protection HTTP response header. When this setting is true, the value of the X-XSS-Protection header is 1. When this setting is false, the value of the X-XSS-Protection header is 0.
For more information about these settings, see X-XSS-Protection in the MDN Web Docs.
sourcepub fn get_protection(&self) -> &Option<bool>
pub fn get_protection(&self) -> &Option<bool>
A Boolean that determines the value of the X-XSS-Protection HTTP response header. When this setting is true, the value of the X-XSS-Protection header is 1. When this setting is false, the value of the X-XSS-Protection header is 0.
For more information about these settings, see X-XSS-Protection in the MDN Web Docs.
sourcepub fn mode_block(self, input: bool) -> Self
pub fn mode_block(self, input: bool) -> Self
A Boolean that determines whether CloudFront includes the mode=block directive in the X-XSS-Protection header.
For more information about this directive, see X-XSS-Protection in the MDN Web Docs.
sourcepub fn set_mode_block(self, input: Option<bool>) -> Self
pub fn set_mode_block(self, input: Option<bool>) -> Self
A Boolean that determines whether CloudFront includes the mode=block directive in the X-XSS-Protection header.
For more information about this directive, see X-XSS-Protection in the MDN Web Docs.
sourcepub fn get_mode_block(&self) -> &Option<bool>
pub fn get_mode_block(&self) -> &Option<bool>
A Boolean that determines whether CloudFront includes the mode=block directive in the X-XSS-Protection header.
For more information about this directive, see X-XSS-Protection in the MDN Web Docs.
sourcepub fn report_uri(self, input: impl Into<String>) -> Self
pub fn report_uri(self, input: impl Into<String>) -> Self
A reporting URI, which CloudFront uses as the value of the report directive in the X-XSS-Protection header.
You cannot specify a ReportUri when ModeBlock is true.
For more information about using a reporting URL, see X-XSS-Protection in the MDN Web Docs.
sourcepub fn set_report_uri(self, input: Option<String>) -> Self
pub fn set_report_uri(self, input: Option<String>) -> Self
A reporting URI, which CloudFront uses as the value of the report directive in the X-XSS-Protection header.
You cannot specify a ReportUri when ModeBlock is true.
For more information about using a reporting URL, see X-XSS-Protection in the MDN Web Docs.
sourcepub fn get_report_uri(&self) -> &Option<String>
pub fn get_report_uri(&self) -> &Option<String>
A reporting URI, which CloudFront uses as the value of the report directive in the X-XSS-Protection header.
You cannot specify a ReportUri when ModeBlock is true.
For more information about using a reporting URL, see X-XSS-Protection in the MDN Web Docs.
sourcepub fn build(self) -> Result<ResponseHeadersPolicyXssProtection, BuildError>
pub fn build(self) -> Result<ResponseHeadersPolicyXssProtection, BuildError>
Consumes the builder and constructs a ResponseHeadersPolicyXssProtection.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for ResponseHeadersPolicyXssProtectionBuilder
impl Clone for ResponseHeadersPolicyXssProtectionBuilder
source§fn clone(&self) -> ResponseHeadersPolicyXssProtectionBuilder
fn clone(&self) -> ResponseHeadersPolicyXssProtectionBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for ResponseHeadersPolicyXssProtectionBuilder
impl Default for ResponseHeadersPolicyXssProtectionBuilder
source§fn default() -> ResponseHeadersPolicyXssProtectionBuilder
fn default() -> ResponseHeadersPolicyXssProtectionBuilder
source§impl PartialEq for ResponseHeadersPolicyXssProtectionBuilder
impl PartialEq for ResponseHeadersPolicyXssProtectionBuilder
source§fn eq(&self, other: &ResponseHeadersPolicyXssProtectionBuilder) -> bool
fn eq(&self, other: &ResponseHeadersPolicyXssProtectionBuilder) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for ResponseHeadersPolicyXssProtectionBuilder
Auto Trait Implementations§
impl Freeze for ResponseHeadersPolicyXssProtectionBuilder
impl RefUnwindSafe for ResponseHeadersPolicyXssProtectionBuilder
impl Send for ResponseHeadersPolicyXssProtectionBuilder
impl Sync for ResponseHeadersPolicyXssProtectionBuilder
impl Unpin for ResponseHeadersPolicyXssProtectionBuilder
impl UnwindSafe for ResponseHeadersPolicyXssProtectionBuilder
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more