pub trait RequestContextExt {
// Required methods
fn with_enhanced_client_id(self, client_id: ClientId) -> Self;
fn extract_client_id(
self,
extractor: &ClientIdExtractor,
headers: Option<&HashMap<String, String>>,
query_params: Option<&HashMap<String, String>>,
) -> Self;
fn get_enhanced_client_id(&self) -> Option<ClientId>;
}Expand description
An extension trait for RequestContext providing enhanced client ID handling.
Required Methods§
Sourcefn with_enhanced_client_id(self, client_id: ClientId) -> Self
fn with_enhanced_client_id(self, client_id: ClientId) -> Self
Sets the client ID using the structured ClientId enum, which includes the method of identification.
Sourcefn extract_client_id(
self,
extractor: &ClientIdExtractor,
headers: Option<&HashMap<String, String>>,
query_params: Option<&HashMap<String, String>>,
) -> Self
fn extract_client_id( self, extractor: &ClientIdExtractor, headers: Option<&HashMap<String, String>>, query_params: Option<&HashMap<String, String>>, ) -> Self
Extracts a client ID from headers or query parameters and sets it on the context.
Sourcefn get_enhanced_client_id(&self) -> Option<ClientId>
fn get_enhanced_client_id(&self) -> Option<ClientId>
Gets the structured ClientId enum from the context, if available.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.