pub trait FromJobCall<Ctx, M = ViaJobCall>: Sized {
type Rejection: IntoJobResult;
// Required method
fn from_job_call(
call: JobCall,
ctx: &Ctx,
) -> impl Future<Output = Result<Self, Self::Rejection>> + Send;
}Expand description
Types that can be created from job calls.
Extractors that implement FromJobCall can consume the job call body and can thus only be run
once for jobs.
If your extractor doesn’t need to consume the job call body then you should implement
FromJobCallParts and not FromJobCall.
See blueprint_sdk::extract for more general docs about extractors.
Required Associated Types§
Sourcetype Rejection: IntoJobResult
type Rejection: IntoJobResult
If the extractor fails it’ll use this “rejection” type. A rejection is a kind of error that can be converted into a job result.
Required Methods§
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.