pub struct HeaderIdExtractor { /* private fields */ }Expand description
Extract ID from an HTTP header.
§Example
use axum_acl::HeaderIdExtractor;
// Extract user ID from X-User-Id header
let extractor = HeaderIdExtractor::new("X-User-Id");Implementations§
Trait Implementations§
Source§impl Clone for HeaderIdExtractor
impl Clone for HeaderIdExtractor
Source§fn clone(&self) -> HeaderIdExtractor
fn clone(&self) -> HeaderIdExtractor
Returns a duplicate 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 HeaderIdExtractor
impl Debug for HeaderIdExtractor
Source§impl<B> IdExtractor<B> for HeaderIdExtractor
impl<B> IdExtractor<B> for HeaderIdExtractor
Source§fn extract_id(&self, request: &Request<B>) -> IdExtractionResult
fn extract_id(&self, request: &Request<B>) -> IdExtractionResult
Extract the user/resource ID from an HTTP request.
Auto Trait Implementations§
impl Freeze for HeaderIdExtractor
impl RefUnwindSafe for HeaderIdExtractor
impl Send for HeaderIdExtractor
impl Sync for HeaderIdExtractor
impl Unpin for HeaderIdExtractor
impl UnwindSafe for HeaderIdExtractor
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