pub enum CookieSecure {
Auto,
Always,
Never,
}Expand description
When cookies Nitr builds carry the Secure attribute
([cookies] secure).
Tri-state rather than a bool because the most common Nitr deployment —
a loopback bind behind a terminating proxy — needs Secure cookies
while [tls] enabled = false is the correct setting for this process.
A bool cannot express that without reading as a contradiction.
Variants§
Auto
Secure when [tls] enabled = true. The first cookie built
without Secure logs a warning, since this cannot see a proxy in
front.
Always
Always Secure: TLS is terminated in front of this process.
Never
Never Secure: plain-HTTP development.
Implementations§
Trait Implementations§
Source§impl Clone for CookieSecure
impl Clone for CookieSecure
impl Copy for CookieSecure
Source§impl Debug for CookieSecure
impl Debug for CookieSecure
Source§impl Default for CookieSecure
impl Default for CookieSecure
Source§impl<'de> Deserialize<'de> for CookieSecure
impl<'de> Deserialize<'de> for CookieSecure
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CookieSecure
Source§impl FromStr for CookieSecure
impl FromStr for CookieSecure
Source§impl PartialEq for CookieSecure
impl PartialEq for CookieSecure
Source§impl Serialize for CookieSecure
impl Serialize for CookieSecure
impl StructuralPartialEq for CookieSecure
Auto Trait Implementations§
impl Freeze for CookieSecure
impl RefUnwindSafe for CookieSecure
impl Send for CookieSecure
impl Sync for CookieSecure
impl Unpin for CookieSecure
impl UnsafeUnpin for CookieSecure
impl UnwindSafe for CookieSecure
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more