Enum google_api_proto::google::cloud::compute::v1::http_redirect_action::RedirectResponseCode
source · #[repr(i32)]pub enum RedirectResponseCode {
UndefinedRedirectResponseCode = 0,
Found = 67_084_130,
MovedPermanentlyDefault = 386_698_449,
PermanentRedirect = 382_006_381,
SeeOther = 445_380_580,
TemporaryRedirect = 489_550_378,
}
Expand description
The HTTP Status code to use for this RedirectAction. Supported values are: - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - FOUND, which corresponds to 302. - SEE_OTHER which corresponds to 303. - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method is retained. - PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method is retained.
Variants§
UndefinedRedirectResponseCode = 0
A value indicating that the enum field is not set.
Found = 67_084_130
Http Status Code 302 - Found.
MovedPermanentlyDefault = 386_698_449
Http Status Code 301 - Moved Permanently.
PermanentRedirect = 382_006_381
Http Status Code 308 - Permanent Redirect maintaining HTTP method.
SeeOther = 445_380_580
Http Status Code 303 - See Other.
TemporaryRedirect = 489_550_378
Http Status Code 307 - Temporary Redirect maintaining HTTP method.
Implementations§
source§impl RedirectResponseCode
impl RedirectResponseCode
sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true
if value
is a variant of RedirectResponseCode
.
sourcepub fn from_i32(value: i32) -> Option<RedirectResponseCode>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<RedirectResponseCode>
Converts an i32
to a RedirectResponseCode
, or None
if value
is not a valid variant.
source§impl RedirectResponseCode
impl RedirectResponseCode
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for RedirectResponseCode
impl Clone for RedirectResponseCode
source§fn clone(&self) -> RedirectResponseCode
fn clone(&self) -> RedirectResponseCode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RedirectResponseCode
impl Debug for RedirectResponseCode
source§impl Default for RedirectResponseCode
impl Default for RedirectResponseCode
source§fn default() -> RedirectResponseCode
fn default() -> RedirectResponseCode
source§impl From<RedirectResponseCode> for i32
impl From<RedirectResponseCode> for i32
source§fn from(value: RedirectResponseCode) -> i32
fn from(value: RedirectResponseCode) -> i32
source§impl Hash for RedirectResponseCode
impl Hash for RedirectResponseCode
source§impl Ord for RedirectResponseCode
impl Ord for RedirectResponseCode
source§fn cmp(&self, other: &RedirectResponseCode) -> Ordering
fn cmp(&self, other: &RedirectResponseCode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for RedirectResponseCode
impl PartialEq for RedirectResponseCode
source§fn eq(&self, other: &RedirectResponseCode) -> bool
fn eq(&self, other: &RedirectResponseCode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for RedirectResponseCode
impl PartialOrd for RedirectResponseCode
source§fn partial_cmp(&self, other: &RedirectResponseCode) -> Option<Ordering>
fn partial_cmp(&self, other: &RedirectResponseCode) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for RedirectResponseCode
impl TryFrom<i32> for RedirectResponseCode
§type Error = DecodeError
type Error = DecodeError
source§fn try_from(value: i32) -> Result<RedirectResponseCode, DecodeError>
fn try_from(value: i32) -> Result<RedirectResponseCode, DecodeError>
impl Copy for RedirectResponseCode
impl Eq for RedirectResponseCode
impl StructuralPartialEq for RedirectResponseCode
Auto Trait Implementations§
impl Freeze for RedirectResponseCode
impl RefUnwindSafe for RedirectResponseCode
impl Send for RedirectResponseCode
impl Sync for RedirectResponseCode
impl Unpin for RedirectResponseCode
impl UnwindSafe for RedirectResponseCode
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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