#[non_exhaustive]pub struct ApiConfigHandler {
pub auth_fail_action: AuthFailAction,
pub login: LoginRequirement,
pub script: String,
pub security_level: SecurityLevel,
pub url: String,
/* private fields */
}
Expand description
Google Cloud Endpoints configuration for API handlers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.auth_fail_action: AuthFailAction
Action to take when users access resources that require
authentication. Defaults to redirect
.
login: LoginRequirement
Level of login required to access this resource. Defaults to
optional
.
script: String
Path to the script from the application root directory.
security_level: SecurityLevel
Security (HTTPS) enforcement for this URL.
url: String
URL to serve the endpoint at.
Implementations§
Source§impl ApiConfigHandler
impl ApiConfigHandler
pub fn new() -> Self
Sourcepub fn set_auth_fail_action<T: Into<AuthFailAction>>(self, v: T) -> Self
pub fn set_auth_fail_action<T: Into<AuthFailAction>>(self, v: T) -> Self
Sets the value of auth_fail_action.
Sourcepub fn set_login<T: Into<LoginRequirement>>(self, v: T) -> Self
pub fn set_login<T: Into<LoginRequirement>>(self, v: T) -> Self
Sets the value of login.
Sourcepub fn set_script<T: Into<String>>(self, v: T) -> Self
pub fn set_script<T: Into<String>>(self, v: T) -> Self
Sets the value of script.
Sourcepub fn set_security_level<T: Into<SecurityLevel>>(self, v: T) -> Self
pub fn set_security_level<T: Into<SecurityLevel>>(self, v: T) -> Self
Sets the value of security_level.
Trait Implementations§
Source§impl Clone for ApiConfigHandler
impl Clone for ApiConfigHandler
Source§fn clone(&self) -> ApiConfigHandler
fn clone(&self) -> ApiConfigHandler
Returns a duplicate 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 Debug for ApiConfigHandler
impl Debug for ApiConfigHandler
Source§impl Default for ApiConfigHandler
impl Default for ApiConfigHandler
Source§fn default() -> ApiConfigHandler
fn default() -> ApiConfigHandler
Returns the “default value” for a type. Read more
Source§impl Message for ApiConfigHandler
impl Message for ApiConfigHandler
Source§impl PartialEq for ApiConfigHandler
impl PartialEq for ApiConfigHandler
impl StructuralPartialEq for ApiConfigHandler
Auto Trait Implementations§
impl Freeze for ApiConfigHandler
impl RefUnwindSafe for ApiConfigHandler
impl Send for ApiConfigHandler
impl Sync for ApiConfigHandler
impl Unpin for ApiConfigHandler
impl UnwindSafe for ApiConfigHandler
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