pub struct UrlMap {
pub url_regex: String,
pub security_level: i32,
pub login: i32,
pub auth_fail_action: i32,
pub redirect_http_response_code: i32,
pub handler_type: Option<HandlerType>,
}
Expand description
URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code or by serving static files uploaded with the version, such as images, CSS, or JavaScript.
Fields§
§url_regex: String
URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.
security_level: i32
Security (HTTPS) enforcement for this URL.
login: i32
Level of login required to access this resource. Not supported for Node.js in the App Engine standard environment.
auth_fail_action: i32
Action to take when users access resources that require
authentication. Defaults to redirect
.
redirect_http_response_code: i32
30x
code to use when performing redirects for the secure
field.
Defaults to 302
.
handler_type: Option<HandlerType>
Type of handler for this URL pattern.
Implementations§
source§impl UrlMap
impl UrlMap
sourcepub fn security_level(&self) -> SecurityLevel
pub fn security_level(&self) -> SecurityLevel
Returns the enum value of security_level
, or the default if the field is set to an invalid enum value.
sourcepub fn set_security_level(&mut self, value: SecurityLevel)
pub fn set_security_level(&mut self, value: SecurityLevel)
Sets security_level
to the provided enum value.
sourcepub fn login(&self) -> LoginRequirement
pub fn login(&self) -> LoginRequirement
Returns the enum value of login
, or the default if the field is set to an invalid enum value.
sourcepub fn set_login(&mut self, value: LoginRequirement)
pub fn set_login(&mut self, value: LoginRequirement)
Sets login
to the provided enum value.
sourcepub fn auth_fail_action(&self) -> AuthFailAction
pub fn auth_fail_action(&self) -> AuthFailAction
Returns the enum value of auth_fail_action
, or the default if the field is set to an invalid enum value.
sourcepub fn set_auth_fail_action(&mut self, value: AuthFailAction)
pub fn set_auth_fail_action(&mut self, value: AuthFailAction)
Sets auth_fail_action
to the provided enum value.
sourcepub fn redirect_http_response_code(&self) -> RedirectHttpResponseCode
pub fn redirect_http_response_code(&self) -> RedirectHttpResponseCode
Returns the enum value of redirect_http_response_code
, or the default if the field is set to an invalid enum value.
sourcepub fn set_redirect_http_response_code(
&mut self,
value: RedirectHttpResponseCode,
)
pub fn set_redirect_http_response_code( &mut self, value: RedirectHttpResponseCode, )
Sets redirect_http_response_code
to the provided enum value.
Trait Implementations§
source§impl Message for UrlMap
impl Message for UrlMap
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for UrlMap
impl PartialEq for UrlMap
impl StructuralPartialEq for UrlMap
Auto Trait Implementations§
impl Freeze for UrlMap
impl RefUnwindSafe for UrlMap
impl Send for UrlMap
impl Sync for UrlMap
impl Unpin for UrlMap
impl UnwindSafe for UrlMap
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request