Struct aws_sdk_wafv2::types::CustomResponseBody
source · #[non_exhaustive]pub struct CustomResponseBody {
pub content_type: ResponseContentType,
pub content: String,
}
Expand description
The response body to use in a custom response to a web request. This is referenced by key from CustomResponse
CustomResponseBodyKey
.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.content_type: ResponseContentType
The type of content in the payload that you are defining in the Content
string.
content: String
The payload of the custom response.
You can use JSON escape strings in JSON content. To do this, you must specify JSON content in the ContentType
setting.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
Implementations§
source§impl CustomResponseBody
impl CustomResponseBody
sourcepub fn content_type(&self) -> &ResponseContentType
pub fn content_type(&self) -> &ResponseContentType
The type of content in the payload that you are defining in the Content
string.
sourcepub fn content(&self) -> &str
pub fn content(&self) -> &str
The payload of the custom response.
You can use JSON escape strings in JSON content. To do this, you must specify JSON content in the ContentType
setting.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
source§impl CustomResponseBody
impl CustomResponseBody
sourcepub fn builder() -> CustomResponseBodyBuilder
pub fn builder() -> CustomResponseBodyBuilder
Creates a new builder-style object to manufacture CustomResponseBody
.
Trait Implementations§
source§impl Clone for CustomResponseBody
impl Clone for CustomResponseBody
source§fn clone(&self) -> CustomResponseBody
fn clone(&self) -> CustomResponseBody
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CustomResponseBody
impl Debug for CustomResponseBody
source§impl PartialEq for CustomResponseBody
impl PartialEq for CustomResponseBody
source§fn eq(&self, other: &CustomResponseBody) -> bool
fn eq(&self, other: &CustomResponseBody) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CustomResponseBody
Auto Trait Implementations§
impl Freeze for CustomResponseBody
impl RefUnwindSafe for CustomResponseBody
impl Send for CustomResponseBody
impl Sync for CustomResponseBody
impl Unpin for CustomResponseBody
impl UnwindSafe for CustomResponseBody
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