pub struct HeaderRef {
pub from_env: String,
pub format: Option<String>,
}Expand description
A reference to the environment variable holding one HTTP header’s value.
Headers carry secrets at least as often as environment variables do, so
they take the same reference-only shape: a literal string is rejected at
parse time. format wraps the value, with {} standing for it, which
is what Authorization = "Bearer <token>" needs; it defaults to the
bare value.
Fields§
§from_env: String§format: Option<String>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HeaderRef
impl<'de> Deserialize<'de> for HeaderRef
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 HeaderRef
impl StructuralPartialEq for HeaderRef
Auto Trait Implementations§
impl Freeze for HeaderRef
impl RefUnwindSafe for HeaderRef
impl Send for HeaderRef
impl Sync for HeaderRef
impl Unpin for HeaderRef
impl UnsafeUnpin for HeaderRef
impl UnwindSafe for HeaderRef
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.