pub struct RequestIdConfig {
pub enabled: bool,
}Expand description
Per-route request-id generation/propagation override.
Modeled as a struct rather than Option<bool> on RouteMetadata because the wire shape is an
object, not a bare boolean: fixtures/request_id.json’s request_id_middleware_can_be_disabled
sends {"enabled": false}, which Option<bool> cannot deserialize at all (“invalid type: map,
expected a boolean”) — the very fixture whose purpose is proving the middleware can be disabled
was the one that failed to parse. ~keep
Fields§
§enabled: boolWhether request-id generation/propagation is active for this route
Trait Implementations§
Source§impl Clone for RequestIdConfig
impl Clone for RequestIdConfig
impl Copy for RequestIdConfig
Source§impl Debug for RequestIdConfig
impl Debug for RequestIdConfig
Source§impl<'de> Deserialize<'de> for RequestIdConfig
impl<'de> Deserialize<'de> for RequestIdConfig
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 RequestIdConfig
Source§impl From<bool> for RequestIdConfig
impl From<bool> for RequestIdConfig
Source§impl PartialEq for RequestIdConfig
impl PartialEq for RequestIdConfig
Source§impl Serialize for RequestIdConfig
impl Serialize for RequestIdConfig
impl StructuralPartialEq for RequestIdConfig
Auto Trait Implementations§
impl Freeze for RequestIdConfig
impl RefUnwindSafe for RequestIdConfig
impl Send for RequestIdConfig
impl Sync for RequestIdConfig
impl Unpin for RequestIdConfig
impl UnsafeUnpin for RequestIdConfig
impl UnwindSafe for RequestIdConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.