Struct aws_sdk_amplify::types::CustomRule
source · #[non_exhaustive]pub struct CustomRule {
pub source: String,
pub target: String,
pub status: Option<String>,
pub condition: Option<String>,
}
Expand description
Describes a custom rewrite or redirect rule.
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.source: String
The source pattern for a URL rewrite or redirect rule.
target: String
The target pattern for a URL rewrite or redirect rule.
status: Option<String>
The status code for a URL rewrite or redirect rule.
- 200
-
Represents a 200 rewrite rule.
- 301
-
Represents a 301 (moved permanently) redirect rule. This and all future requests should be directed to the target URL.
- 302
-
Represents a 302 temporary redirect rule.
- 404
-
Represents a 404 redirect rule.
- 404-200
-
Represents a 404 rewrite rule.
condition: Option<String>
The condition for a URL rewrite or redirect rule, such as a country code.
Implementations§
source§impl CustomRule
impl CustomRule
sourcepub fn status(&self) -> Option<&str>
pub fn status(&self) -> Option<&str>
The status code for a URL rewrite or redirect rule.
- 200
-
Represents a 200 rewrite rule.
- 301
-
Represents a 301 (moved permanently) redirect rule. This and all future requests should be directed to the target URL.
- 302
-
Represents a 302 temporary redirect rule.
- 404
-
Represents a 404 redirect rule.
- 404-200
-
Represents a 404 rewrite rule.
source§impl CustomRule
impl CustomRule
sourcepub fn builder() -> CustomRuleBuilder
pub fn builder() -> CustomRuleBuilder
Creates a new builder-style object to manufacture CustomRule
.
Trait Implementations§
source§impl Clone for CustomRule
impl Clone for CustomRule
source§fn clone(&self) -> CustomRule
fn clone(&self) -> CustomRule
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CustomRule
impl Debug for CustomRule
source§impl PartialEq for CustomRule
impl PartialEq for CustomRule
source§fn eq(&self, other: &CustomRule) -> bool
fn eq(&self, other: &CustomRule) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CustomRule
Auto Trait Implementations§
impl Freeze for CustomRule
impl RefUnwindSafe for CustomRule
impl Send for CustomRule
impl Sync for CustomRule
impl Unpin for CustomRule
impl UnwindSafe for CustomRule
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