#[repr(i32)]pub enum SecurityLevel {
SecureUnspecified = 0,
SecureNever = 1,
SecureOptional = 2,
SecureAlways = 3,
}
Expand description
Methods to enforce security (HTTPS) on a URL.
Variants§
SecureUnspecified = 0
Not specified.
SecureNever = 1
Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.
SecureOptional = 2
Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.
SecureAlways = 3
Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect.
Implementations§
Trait Implementations§
Source§impl Clone for SecurityLevel
impl Clone for SecurityLevel
Source§fn clone(&self) -> SecurityLevel
fn clone(&self) -> SecurityLevel
Returns a copy 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 SecurityLevel
impl Debug for SecurityLevel
Source§impl Default for SecurityLevel
impl Default for SecurityLevel
Source§fn default() -> SecurityLevel
fn default() -> SecurityLevel
Returns the “default value” for a type. Read more
Source§impl From<SecurityLevel> for i32
impl From<SecurityLevel> for i32
Source§fn from(value: SecurityLevel) -> i32
fn from(value: SecurityLevel) -> i32
Converts to this type from the input type.
Source§impl Hash for SecurityLevel
impl Hash for SecurityLevel
Source§impl Ord for SecurityLevel
impl Ord for SecurityLevel
Source§fn cmp(&self, other: &SecurityLevel) -> Ordering
fn cmp(&self, other: &SecurityLevel) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SecurityLevel
impl PartialEq for SecurityLevel
Source§impl PartialOrd for SecurityLevel
impl PartialOrd for SecurityLevel
impl Copy for SecurityLevel
impl Eq for SecurityLevel
impl StructuralPartialEq for SecurityLevel
Auto Trait Implementations§
impl Freeze for SecurityLevel
impl RefUnwindSafe for SecurityLevel
impl Send for SecurityLevel
impl Sync for SecurityLevel
impl Unpin for SecurityLevel
impl UnwindSafe for SecurityLevel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key
and return true
if they are equal.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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request