#[non_exhaustive]pub enum LoginRequirement {
LoginUnspecified,
LoginOptional,
LoginAdmin,
LoginRequired,
UnknownValue(UnknownValue),
}Expand description
Methods to restrict access to a URL based on login status.
§Working with unknown values
This enum is defined as #[non_exhaustive] because Google Cloud may add
additional enum variants at any time. Adding new variants is not considered
a breaking change. Applications should write their code in anticipation of:
- New values appearing in future releases of the client library, and
- New values received dynamically, without application changes.
Please consult the Working with enums section in the user guide for some guidelines.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LoginUnspecified
Not specified. LOGIN_OPTIONAL is assumed.
LoginOptional
Does not require that the user is signed in.
LoginAdmin
If the user is not signed in, the auth_fail_action is taken.
In addition, if the user is not an administrator for the
application, they are given an error message regardless of
auth_fail_action. If the user is an administrator, the handler
proceeds.
LoginRequired
If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken.
UnknownValue(UnknownValue)
If set, the enum was initialized with an unknown value.
Applications can examine the value using LoginRequirement::value or LoginRequirement::name.
Implementations§
Trait Implementations§
Source§impl Clone for LoginRequirement
impl Clone for LoginRequirement
Source§fn clone(&self) -> LoginRequirement
fn clone(&self) -> LoginRequirement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LoginRequirement
impl Debug for LoginRequirement
Source§impl Default for LoginRequirement
impl Default for LoginRequirement
Source§impl<'de> Deserialize<'de> for LoginRequirement
impl<'de> Deserialize<'de> for LoginRequirement
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Display for LoginRequirement
impl Display for LoginRequirement
Source§impl From<&str> for LoginRequirement
impl From<&str> for LoginRequirement
Source§impl From<i32> for LoginRequirement
impl From<i32> for LoginRequirement
Source§impl PartialEq for LoginRequirement
impl PartialEq for LoginRequirement
Source§fn eq(&self, other: &LoginRequirement) -> bool
fn eq(&self, other: &LoginRequirement) -> bool
self and other values to be equal, and is used by ==.