Task

Struct Task 

Source
pub struct Task<Args, Context, IdType = RandomId> {
    pub args: Args,
    pub parts: Parts<Context, IdType>,
}
Expand description

Represents a task which will be executed Should be considered a single unit of work

Fields§

§args: Args

The argument task part

§parts: Parts<Context, IdType>

Parts of the task eg id, attempts and context

Implementations§

Source§

impl<Args, Ctx: Default, IdType> Task<Args, Ctx, IdType>

Source

pub fn builder(args: Args) -> TaskBuilder<Args, Ctx, IdType>

Create a TaskBuilder with the given args

Source§

impl<Args, Ctx, IdType> Task<Args, Ctx, IdType>

Source

pub fn new(args: Args) -> Self
where Ctx: Default,

Creates a new Task

Source

pub fn new_with_ctx(req: Args, ctx: Ctx) -> Self

Creates a task with context provided

Source

pub fn new_with_data(req: Args, data: Extensions, ctx: Ctx) -> Self

Creates a task with data and context provided

Source

pub fn take(self) -> (Args, Parts<Ctx, IdType>)

Take the task into its parts

Source

pub async fn extract<T: FromRequest<Self>>(&self) -> Result<T, T::Error>

Extract a value of type T from the task’s context

Uses FromRequest trait to extract the value.

Source

pub fn into_builder(self) -> TaskBuilder<Args, Ctx, IdType>

Converts the task into a builder pattern.

Source§

impl<Args, Ctx, IdType> Task<Args, Ctx, IdType>

Source

pub fn try_map<F, NewArgs, Err>( self, f: F, ) -> Result<Task<NewArgs, Ctx, IdType>, Err>
where F: FnOnce(Args) -> Result<NewArgs, Err>,

Maps the args field using the provided function, consuming the task.

Source

pub fn map<F, NewArgs>(self, f: F) -> Task<NewArgs, Ctx, IdType>
where F: FnOnce(Args) -> NewArgs,

Maps the args field using the provided function, consuming the task.

Source

pub fn map_all<F, NewArgs, NewCtx>(self, f: F) -> Task<NewArgs, NewCtx, IdType>
where F: FnOnce(Args, Parts<Ctx, IdType>) -> (NewArgs, Parts<NewCtx, IdType>),

Maps both args and parts together.

Source

pub fn map_parts<F, NewCtx>(self, f: F) -> Task<Args, NewCtx, IdType>
where F: FnOnce(Parts<Ctx, IdType>) -> Parts<NewCtx, IdType>,

Maps only the parts field.

Trait Implementations§

Source§

impl<Args: Clone, Context: Clone, IdType: Clone> Clone for Task<Args, Context, IdType>

Source§

fn clone(&self) -> Task<Args, Context, IdType>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Args: Debug, Context: Debug, IdType: Debug> Debug for Task<Args, Context, IdType>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Args: Default, Context: Default, IdType: Default> Default for Task<Args, Context, IdType>

Source§

fn default() -> Task<Args, Context, IdType>

Returns the “default value” for a type. Read more
Source§

impl<'de, Args, Context, IdType> Deserialize<'de> for Task<Args, Context, IdType>
where Args: Deserialize<'de>, Context: Deserialize<'de>, IdType: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<Args: Sync, Ctx: Sync, IdType: Sync + Send> FromRequest<Task<Args, Ctx, IdType>> for Attempt

Source§

type Error = Infallible

The error type that can occur during extraction.
Source§

async fn from_request( task: &Task<Args, Ctx, IdType>, ) -> Result<Self, Self::Error>

Perform the extraction.
Source§

impl<T: Clone + Send + Sync + 'static, Args: Sync, Ctx: Sync, IdType: Sync + Send> FromRequest<Task<Args, Ctx, IdType>> for Data<T>

Source§

type Error = MissingDataError

The error type that can occur during extraction.
Source§

async fn from_request( task: &Task<Args, Ctx, IdType>, ) -> Result<Self, Self::Error>

Perform the extraction.
Source§

impl<Args: Sync, Ctx: Sync + Clone, IdType: Sync + Send> FromRequest<Task<Args, Ctx, IdType>> for LongRunnerCtx

Source§

type Error = MissingDataError

The error type that can occur during extraction.
Source§

async fn from_request( task: &Task<Args, Ctx, IdType>, ) -> Result<Self, Self::Error>

Perform the extraction.
Source§

impl<T, Args: Send + Sync, Ctx: MetadataExt<T> + Send + Sync, IdType: Send + Sync> FromRequest<Task<Args, Ctx, IdType>> for Meta<T>

Source§

type Error = <Ctx as MetadataExt<T>>::Error

The error type that can occur during extraction.
Source§

async fn from_request( task: &Task<Args, Ctx, IdType>, ) -> Result<Self, Self::Error>

Perform the extraction.
Source§

impl<Args: Sync, Ctx: Sync, IdType: Sync + Send + Clone> FromRequest<Task<Args, Ctx, IdType>> for TaskId<IdType>

Source§

type Error = MissingDataError

The error type that can occur during extraction.
Source§

async fn from_request( task: &Task<Args, Ctx, IdType>, ) -> Result<Self, Self::Error>

Perform the extraction.
Source§

impl<Args: Sync, Ctx: Sync, IdType: Sync + Send> FromRequest<Task<Args, Ctx, IdType>> for WorkerContext

Source§

type Error = MissingDataError

The error type that can occur during extraction.
Source§

async fn from_request( task: &Task<Args, Ctx, IdType>, ) -> Result<Self, Self::Error>

Perform the extraction.
Source§

impl<Args, Context, IdType> Serialize for Task<Args, Context, IdType>
where Args: Serialize, Context: Serialize, IdType: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<S, A, Args, Ctx, Res, IdType> Service<Task<Args, Ctx, IdType>> for AcknowledgeService<S, A>
where S: Service<Task<Args, Ctx, IdType>, Response = Res>, A: Acknowledge<Res, Ctx, IdType> + Clone + Send + 'static, S::Error: Into<BoxDynError>, A::Error: Error + Send + Sync + 'static, S::Future: Send + 'static, A::Future: Send + 'static, Ctx: Clone + Sync + 'static + Send, Res: Send, IdType: Send + Clone + 'static,

Source§

type Response = Res

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<Res, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<S, T, Args, Ctx, IdType> Service<Task<Args, Ctx, IdType>> for AddExtension<S, T>
where S: Service<Task<Args, Ctx, IdType>>, T: Clone + Send + Sync + 'static,

Source§

type Response = <S as Service<Task<Args, Ctx, IdType>>>::Response

Responses given by the service.
Source§

type Error = <S as Service<Task<Args, Ctx, IdType>>>::Error

Errors produced by the service.
Source§

type Future = <S as Service<Task<Args, Ctx, IdType>>>::Future

The future response value.
Source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<S, Args, Ctx, IdType> Service<Task<Args, Ctx, IdType>> for EventListenerService<S>
where S: Service<Task<Args, Ctx, IdType>>,

Source§

type Response = <S as Service<Task<Args, Ctx, IdType>>>::Response

Responses given by the service.
Source§

type Error = <S as Service<Task<Args, Ctx, IdType>>>::Error

Errors produced by the service.
Source§

type Future = <S as Service<Task<Args, Ctx, IdType>>>::Future

The future response value.
Source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, request: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<S, Args, Ctx, IdType> Service<Task<Args, Ctx, IdType>> for LongRunningService<S>
where S: Service<Task<Args, Ctx, IdType>>, S::Future: Send + 'static, S::Response: Send, S::Error: Send,

Source§

type Response = <S as Service<Task<Args, Ctx, IdType>>>::Response

Responses given by the service.
Source§

type Error = <S as Service<Task<Args, Ctx, IdType>>>::Error

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<<S as Service<Task<Args, Ctx, IdType>>>::Response, <S as Service<Task<Args, Ctx, IdType>>>::Error>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args, R, Ctx, IdType> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, ()>
where T: FnMut(Args) -> F, F: Future, F::Output: IntoResponse<Output = R>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Map<F, fn(<F as Future>::Output) -> Result<R, Box<dyn Error + Sync + Send>>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2)>
where T: FnMut(Args, A1, A2) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3)>
where T: FnMut(Args, A1, A2, A3) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4)>
where T: FnMut(Args, A1, A2, A3, A4) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4, A5> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4, A5)>
where T: FnMut(Args, A1, A2, A3, A4, A5) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args, Ctx, IdType>> + Send, <A5 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4, A5, A6> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4, A5, A6)>
where T: FnMut(Args, A1, A2, A3, A4, A5, A6) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args, Ctx, IdType>> + Send, <A5 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args, Ctx, IdType>> + Send, <A6 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4, A5, A6, A7> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4, A5, A6, A7)>
where T: FnMut(Args, A1, A2, A3, A4, A5, A6, A7) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args, Ctx, IdType>> + Send, <A5 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args, Ctx, IdType>> + Send, <A6 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args, Ctx, IdType>> + Send, <A7 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4, A5, A6, A7, A8> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8)>
where T: FnMut(Args, A1, A2, A3, A4, A5, A6, A7, A8) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args, Ctx, IdType>> + Send, <A5 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args, Ctx, IdType>> + Send, <A6 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args, Ctx, IdType>> + Send, <A7 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args, Ctx, IdType>> + Send, <A8 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4, A5, A6, A7, A8, A9> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9)>
where T: FnMut(Args, A1, A2, A3, A4, A5, A6, A7, A8, A9) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args, Ctx, IdType>> + Send, <A5 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args, Ctx, IdType>> + Send, <A6 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args, Ctx, IdType>> + Send, <A7 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args, Ctx, IdType>> + Send, <A8 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args, Ctx, IdType>> + Send, <A9 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)>
where T: FnMut(Args, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args, Ctx, IdType>> + Send, <A5 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args, Ctx, IdType>> + Send, <A6 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args, Ctx, IdType>> + Send, <A7 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args, Ctx, IdType>> + Send, <A8 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args, Ctx, IdType>> + Send, <A9 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args, Ctx, IdType>> + Send, <A10 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)>
where T: FnMut(Args, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args, Ctx, IdType>> + Send, <A5 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args, Ctx, IdType>> + Send, <A6 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args, Ctx, IdType>> + Send, <A7 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args, Ctx, IdType>> + Send, <A8 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args, Ctx, IdType>> + Send, <A9 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args, Ctx, IdType>> + Send, <A10 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A11: FromRequest<Task<Args, Ctx, IdType>> + Send, <A11 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)>
where T: FnMut(Args, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args, Ctx, IdType>> + Send, <A5 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args, Ctx, IdType>> + Send, <A6 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args, Ctx, IdType>> + Send, <A7 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args, Ctx, IdType>> + Send, <A8 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args, Ctx, IdType>> + Send, <A9 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args, Ctx, IdType>> + Send, <A10 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A11: FromRequest<Task<Args, Ctx, IdType>> + Send, <A11 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A12: FromRequest<Task<Args, Ctx, IdType>> + Send, <A12 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)>
where T: FnMut(Args, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args, Ctx, IdType>> + Send, <A5 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args, Ctx, IdType>> + Send, <A6 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args, Ctx, IdType>> + Send, <A7 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args, Ctx, IdType>> + Send, <A8 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args, Ctx, IdType>> + Send, <A9 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args, Ctx, IdType>> + Send, <A10 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A11: FromRequest<Task<Args, Ctx, IdType>> + Send, <A11 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A12: FromRequest<Task<Args, Ctx, IdType>> + Send, <A12 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A13: FromRequest<Task<Args, Ctx, IdType>> + Send, <A13 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)>
where T: FnMut(Args, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args, Ctx, IdType>> + Send, <A5 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args, Ctx, IdType>> + Send, <A6 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args, Ctx, IdType>> + Send, <A7 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args, Ctx, IdType>> + Send, <A8 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args, Ctx, IdType>> + Send, <A9 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args, Ctx, IdType>> + Send, <A10 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A11: FromRequest<Task<Args, Ctx, IdType>> + Send, <A11 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A12: FromRequest<Task<Args, Ctx, IdType>> + Send, <A12 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A13: FromRequest<Task<Args, Ctx, IdType>> + Send, <A13 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A14: FromRequest<Task<Args, Ctx, IdType>> + Send, <A14 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)>
where T: FnMut(Args, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args, Ctx, IdType>> + Send, <A5 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args, Ctx, IdType>> + Send, <A6 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args, Ctx, IdType>> + Send, <A7 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args, Ctx, IdType>> + Send, <A8 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args, Ctx, IdType>> + Send, <A9 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args, Ctx, IdType>> + Send, <A10 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A11: FromRequest<Task<Args, Ctx, IdType>> + Send, <A11 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A12: FromRequest<Task<Args, Ctx, IdType>> + Send, <A12 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A13: FromRequest<Task<Args, Ctx, IdType>> + Send, <A13 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A14: FromRequest<Task<Args, Ctx, IdType>> + Send, <A14 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A15: FromRequest<Task<Args, Ctx, IdType>> + Send, <A15 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)>
where T: FnMut(Args, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A1: FromRequest<Task<Args, Ctx, IdType>> + Send, <A1 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args, Ctx, IdType>> + Send, <A2 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args, Ctx, IdType>> + Send, <A3 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args, Ctx, IdType>> + Send, <A4 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args, Ctx, IdType>> + Send, <A5 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args, Ctx, IdType>> + Send, <A6 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args, Ctx, IdType>> + Send, <A7 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args, Ctx, IdType>> + Send, <A8 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args, Ctx, IdType>> + Send, <A9 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args, Ctx, IdType>> + Send, <A10 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A11: FromRequest<Task<Args, Ctx, IdType>> + Send, <A11 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A12: FromRequest<Task<Args, Ctx, IdType>> + Send, <A12 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A13: FromRequest<Task<Args, Ctx, IdType>> + Send, <A13 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A14: FromRequest<Task<Args, Ctx, IdType>> + Send, <A14 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A15: FromRequest<Task<Args, Ctx, IdType>> + Send, <A15 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync, A16: FromRequest<Task<Args, Ctx, IdType>> + Send, <A16 as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<T, F, Args: Send + 'static, R, Ctx: Send + 'static, IdType: Send + Clone + 'static, A> Service<Task<Args, Ctx, IdType>> for TaskFn<T, Args, Ctx, A>
where T: FnMut(Args, A) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A: FromRequest<Task<Args, Ctx, IdType>> + Send, <A as FromRequest<Task<Args, Ctx, IdType>>>::Error: Error + 'static + Send + Sync,

Source§

type Response = R

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<R, Box<dyn Error + Sync + Send>>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<S, Args, Ctx, Res, IdType> Service<Task<Args, Ctx, IdType>> for TestEmitService<S, Res, IdType>
where S: Service<Task<Args, Ctx, IdType>, Response = Res> + Send + 'static, S::Future: Send + 'static, Args: Send + 'static, Ctx: Send + 'static, S::Response: Send + 'static, S::Error: Into<BoxDynError> + Send, IdType: Send + 'static + Clone,

Source§

type Response = ()

Responses given by the service.
Source§

type Error = String

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<<TestEmitService<S, Res, IdType> as Service<Task<Args, Ctx, IdType>>>::Response, <TestEmitService<S, Res, IdType> as Service<Task<Args, Ctx, IdType>>>::Error>> + Send>>

The future response value.
Source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<S, Args, Ctx, IdType> Service<Task<Args, Ctx, IdType>> for TrackerService<S>
where S: Service<Task<Args, Ctx, IdType>>,

Source§

type Response = <S as Service<Task<Args, Ctx, IdType>>>::Response

Responses given by the service.
Source§

type Error = <S as Service<Task<Args, Ctx, IdType>>>::Error

Errors produced by the service.
Source§

type Future = Tracked<AttemptOnPollFuture<<S as Service<Task<Args, Ctx, IdType>>>::Future>>

The future response value.
Source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, task: Task<Args, Ctx, IdType>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<Args, Ctx> Sink<Task<Args, Ctx>> for MemorySink<Args, Ctx>

Source§

type Error = SendError

The type of value produced by the sink when an error occurs.
Source§

fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Attempts to prepare the Sink to receive a value. Read more
Source§

fn start_send( self: Pin<&mut Self>, item: Task<Args, Ctx>, ) -> Result<(), Self::Error>

Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready which returned Poll::Ready(Ok(())). Read more
Source§

fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output from this sink. Read more
Source§

fn poll_close( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output and close this sink, if necessary. Read more
Source§

impl<Args, Ctx> Sink<Task<Args, Ctx>> for MemoryStorage<Args, Ctx>

Source§

type Error = SendError

The type of value produced by the sink when an error occurs.
Source§

fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Attempts to prepare the Sink to receive a value. Read more
Source§

fn start_send( self: Pin<&mut Self>, item: Task<Args, Ctx>, ) -> Result<(), Self::Error>

Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready which returned Poll::Ready(Ok(())). Read more
Source§

fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output from this sink. Read more
Source§

fn poll_close( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output and close this sink, if necessary. Read more
Source§

impl<Args, Ctx, IdType, DB, Fetch, S, Codec, Config> Sink<Task<Args, Ctx, IdType>> for CustomBackend<Args, DB, Fetch, S, IdType, Codec, Config>
where S: Sink<Task<Args, Ctx, IdType>>,

Source§

type Error = <S as Sink<Task<Args, Ctx, IdType>>>::Error

The type of value produced by the sink when an error occurs.
Source§

fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Attempts to prepare the Sink to receive a value. Read more
Source§

fn start_send( self: Pin<&mut Self>, item: Task<Args, Ctx, IdType>, ) -> Result<(), Self::Error>

Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready which returned Poll::Ready(Ok(())). Read more
Source§

fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output from this sink. Read more
Source§

fn poll_close( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output and close this sink, if necessary. Read more
Source§

impl<Args: Unpin + Serialize> Sink<Task<Args, Map<String, Value>>> for JsonStorage<Args>

Source§

type Error = SendError

The type of value produced by the sink when an error occurs.
Source§

fn poll_ready( self: Pin<&mut Self>, _cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Attempts to prepare the Sink to receive a value. Read more
Source§

fn start_send( self: Pin<&mut Self>, item: Task<Args, Map<String, Value>>, ) -> Result<(), Self::Error>

Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready which returned Poll::Ready(Ok(())). Read more
Source§

fn poll_flush( self: Pin<&mut Self>, _cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output from this sink. Read more
Source§

fn poll_close( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Flush any remaining output and close this sink, if necessary. Read more

Auto Trait Implementations§

§

impl<Args, Context, IdType> Freeze for Task<Args, Context, IdType>
where Args: Freeze, Context: Freeze, IdType: Freeze,

§

impl<Args, Context, IdType = RandomId> !RefUnwindSafe for Task<Args, Context, IdType>

§

impl<Args, Context, IdType> Send for Task<Args, Context, IdType>
where Args: Send, Context: Send, IdType: Send,

§

impl<Args, Context, IdType> Sync for Task<Args, Context, IdType>
where Args: Sync, Context: Sync, IdType: Sync,

§

impl<Args, Context, IdType> Unpin for Task<Args, Context, IdType>
where Args: Unpin, Context: Unpin, IdType: Unpin,

§

impl<Args, Context, IdType = RandomId> !UnwindSafe for Task<Args, Context, IdType>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,