#[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 · 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§impl Serialize for LoginRequirement
impl Serialize for LoginRequirement
impl StructuralPartialEq for LoginRequirement
Auto Trait Implementations§
impl Freeze for LoginRequirement
impl RefUnwindSafe for LoginRequirement
impl Send for LoginRequirement
impl Sync for LoginRequirement
impl Unpin for LoginRequirement
impl UnwindSafe for LoginRequirement
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.