pub struct TrustTaskHeader(pub TrustTask);Expand description
Axum extractor: pulls the Trust-Task header off a request and
parses it into a validated TrustTask.
Rejections (per spec §16.2):
- missing header →
AppError::TrustTaskMissing(400) - malformed value →
AppError::TrustTaskMalformed(400) - non-UTF-8 header →
AppError::Validation(400)
Note: using this extractor does not enforce exact-match against
a handler’s expected task. That correctness check lives in
super::router::TrustTaskRouter::route_with_task. Use this
extractor only when a handler genuinely needs to read the task
(e.g. for logging or for forwarding it to another service).
Tuple Fields§
§0: TrustTaskTrait Implementations§
Source§impl<S> FromRequestParts<S> for TrustTaskHeader
impl<S> FromRequestParts<S> for TrustTaskHeader
Auto Trait Implementations§
impl Freeze for TrustTaskHeader
impl RefUnwindSafe for TrustTaskHeader
impl Send for TrustTaskHeader
impl Sync for TrustTaskHeader
impl Unpin for TrustTaskHeader
impl UnsafeUnpin for TrustTaskHeader
impl UnwindSafe for TrustTaskHeader
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> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<S, T> FromRequest<S, ViaParts> for T
impl<S, T> FromRequest<S, ViaParts> for T
Source§type Rejection = <T as FromRequestParts<S>>::Rejection
type Rejection = <T as FromRequestParts<S>>::Rejection
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Source§fn from_request(
req: Request<Body>,
state: &S,
) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
fn from_request( req: Request<Body>, state: &S, ) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
Perform the extraction.
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, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
Source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
Returns a reference to the resource of type
T.