Skip to main content

Task

Struct Task 

Source
pub struct Task<Args> {
    pub args: Args,
    /* private fields */
}
Expand description

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

Fields§

§args: Args

The argument task part

Implementations§

Source§

impl<Args> Task<Args>

Source

pub fn new(args: Args) -> Self

Creates a new task given some args

Used to easily create a ready task. Please prefer to use TaskBuilder if you need to modify ExecutionContext

Source

pub fn ctx(&self) -> &Arc<ExecutionContext>

Returns the execution context associated with the task.

Source§

impl<Args> Task<Args>

Source

pub fn take(self) -> (Args, Arc<ExecutionContext>)

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 map_args<F, NewArgs>(self, f: F) -> Task<NewArgs>
where F: FnOnce(Args) -> NewArgs,

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

Source

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

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

Source

pub fn map_context<F>(self, f: F) -> Self

Maps the execution_context using the provided function, consuming the task

Source

pub fn into_builder(self) -> TaskBuilder<Args>

Converts the task into a TaskBuilder

Source

pub fn inject_data<D>(&mut self, data: D) -> Option<D>
where D: Send + Clone + Sync + 'static,

Inject data into the execution context via Arc::make_mut

If an extension of this type already existed, it will be returned.

Source

pub fn inject_metadata<M>(&mut self, value: &M) -> Result<(), M::Error>
where M: Metadata,

Inject metadata into the execution context via Arc::make_mut

Methods from Deref<Target = ExecutionContext>§

Source

pub fn task_id(&self) -> Option<&TaskId>

Returns the task’s ID, if one has been allocated.

Source

pub fn data(&self) -> &Extensions

Returns the extensions associated with the task.

Source

pub fn attempt(&self) -> usize

Returns the number of attempts made to execute the task.

Source

pub fn raw_attempt(&self) -> &Attempt

Get the atomic attempt

Source

pub fn status(&self) -> Status

Returns the current status of the task.

Source

pub fn raw_status(&self) -> &AtomicStatus

Get the atomic status

Source

pub fn run_at(&self) -> Option<u64>

Returns the time at which the task is scheduled to run.

Returns None if no run time has been specified.

Source

pub fn done_at(&self) -> Option<u64>

Returns the time at which the task was completed.

Returns None if the task has not been completed.

Source

pub fn lock_at(&self) -> Option<u64>

Returns the time at which the task was locked.

Returns None if the task is not locked.

Source

pub fn lock_by(&self) -> Option<&str>

Returns the identifier of the worker or process currently holding the lock on this task.

Returns None if the task is not currently locked.

Source

pub fn idempotency_key(&self) -> Option<&str>

Returns the idempotency key associated with the task.

Returns None if no idempotency key has been specified.

Source

pub fn metadata(&self) -> &MetadataStore

Returns the metadata associated with the task.

Source

pub fn max_attempts(&self) -> Option<usize>

Returns the maximum number of attempts allowed for the task.

Returns None if no maximum has been specified.

Source

pub fn priority(&self) -> Option<usize>

Returns the priority of the task.

Returns None if no priority has been specified.

Source

pub fn queue(&self) -> Option<&Queue>

Returns the queue to which the task belongs.

Returns None if the task is not associated with a queue.

Source

pub fn runs(&self) -> &[Run]

Returns the runs recorded for this task.

Trait Implementations§

Source§

impl<Args: Clone> Clone for Task<Args>

Source§

fn clone(&self) -> Task<Args>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<Args: Debug> Debug for Task<Args>

Source§

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

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

impl<Args: Default> Default for Task<Args>

Source§

fn default() -> Task<Args>

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

impl<Args> Deref for Task<Args>

Source§

type Target = ExecutionContext

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<A: Send + 'static> From<A> for Task<A>

Source§

fn from(value: A) -> Self

Converts to this type from the input type.
Source§

impl<Args> FromRequest<Task<Args>> for Queue
where Args: Sync,

Source§

type Error = QueueError

The error type that can occur during extraction.
Source§

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

Perform the extraction.
Source§

impl<Args> FromRequest<Task<Args>> for Attempt
where Args: Sync,

Source§

type Error = !

The error type that can occur during extraction.
Source§

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

Perform the extraction.
Source§

impl<Args: Sync> FromRequest<Task<Args>> for TaskContext

Source§

type Error = MissingDataError

The error type that can occur during extraction.
Source§

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

Perform the extraction.
Source§

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

Source§

type Error = MissingDataError

The error type that can occur during extraction.
Source§

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

Perform the extraction.
Source§

impl<T: Metadata, Args: Send + Sync> FromRequest<Task<Args>> for Meta<T>

Source§

type Error = <T as Metadata>::Error

The error type that can occur during extraction.
Source§

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

Perform the extraction.
Source§

impl<Args: Send + Sync> FromRequest<Task<Args>> for MetadataStore

Source§

type Error = !

The error type that can occur during extraction.
Source§

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

Perform the extraction.
Source§

impl<Args: Sync> FromRequest<Task<Args>> for TaskId

Source§

type Error = MissingDataError

The error type that can occur during extraction.
Source§

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

Perform the extraction.
Source§

impl<Args: Sync> FromRequest<Task<Args>> for WorkerContext

Source§

type Error = MissingDataError

The error type that can occur during extraction.
Source§

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

Perform the extraction.
Source§

impl<Args: Sync, Res> FromRequest<Task<Args>> for TaskRunner<Res>

Source§

type Error = MissingDataError

The error type that can occur during extraction.
Source§

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

Perform the extraction.
Source§

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

Source§

type Response = <S as Service<Task<Args>>>::Response

Responses given by the service.
Source§

type Error = <S as Service<Task<Args>>>::Error

Errors produced by the service.
Source§

type Future = <S as Service<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args, R> Service<Task<Args>> for TaskFn<T, Args, ()>
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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A> Service<Task<Args>> for TaskFn<T, Args, A>
where T: FnMut(Args, A) -> F + Send + Clone + 'static, F: Future + Send, F::Output: IntoResponse<Output = R>, A: FromRequest<Task<Args>> + Send, <A as FromRequest<Task<Args>>>::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>) -> Self::Future

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

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

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4, A5> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args>> + Send, <A5 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4, A5, A6> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args>> + Send, <A5 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args>> + Send, <A6 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4, A5, A6, A7> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args>> + Send, <A5 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args>> + Send, <A6 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args>> + Send, <A7 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4, A5, A6, A7, A8> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args>> + Send, <A5 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args>> + Send, <A6 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args>> + Send, <A7 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args>> + Send, <A8 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4, A5, A6, A7, A8, A9> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args>> + Send, <A5 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args>> + Send, <A6 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args>> + Send, <A7 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args>> + Send, <A8 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args>> + Send, <A9 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args>> + Send, <A5 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args>> + Send, <A6 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args>> + Send, <A7 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args>> + Send, <A8 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args>> + Send, <A9 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args>> + Send, <A10 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args>> + Send, <A5 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args>> + Send, <A6 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args>> + Send, <A7 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args>> + Send, <A8 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args>> + Send, <A9 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args>> + Send, <A10 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A11: FromRequest<Task<Args>> + Send, <A11 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args>> + Send, <A5 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args>> + Send, <A6 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args>> + Send, <A7 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args>> + Send, <A8 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args>> + Send, <A9 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args>> + Send, <A10 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A11: FromRequest<Task<Args>> + Send, <A11 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A12: FromRequest<Task<Args>> + Send, <A12 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args>> + Send, <A5 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args>> + Send, <A6 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args>> + Send, <A7 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args>> + Send, <A8 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args>> + Send, <A9 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args>> + Send, <A10 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A11: FromRequest<Task<Args>> + Send, <A11 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A12: FromRequest<Task<Args>> + Send, <A12 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A13: FromRequest<Task<Args>> + Send, <A13 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args>> + Send, <A5 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args>> + Send, <A6 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args>> + Send, <A7 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args>> + Send, <A8 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args>> + Send, <A9 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args>> + Send, <A10 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A11: FromRequest<Task<Args>> + Send, <A11 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A12: FromRequest<Task<Args>> + Send, <A12 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A13: FromRequest<Task<Args>> + Send, <A13 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A14: FromRequest<Task<Args>> + Send, <A14 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args>> + Send, <A5 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args>> + Send, <A6 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args>> + Send, <A7 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args>> + Send, <A8 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args>> + Send, <A9 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args>> + Send, <A10 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A11: FromRequest<Task<Args>> + Send, <A11 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A12: FromRequest<Task<Args>> + Send, <A12 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A13: FromRequest<Task<Args>> + Send, <A13 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A14: FromRequest<Task<Args>> + Send, <A14 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A15: FromRequest<Task<Args>> + Send, <A15 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

impl<T, F, Args: Send + 'static, R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> Service<Task<Args>> for TaskFn<T, Args, (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>> + Send, <A1 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A2: FromRequest<Task<Args>> + Send, <A2 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A3: FromRequest<Task<Args>> + Send, <A3 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A4: FromRequest<Task<Args>> + Send, <A4 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A5: FromRequest<Task<Args>> + Send, <A5 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A6: FromRequest<Task<Args>> + Send, <A6 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A7: FromRequest<Task<Args>> + Send, <A7 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A8: FromRequest<Task<Args>> + Send, <A8 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A9: FromRequest<Task<Args>> + Send, <A9 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A10: FromRequest<Task<Args>> + Send, <A10 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A11: FromRequest<Task<Args>> + Send, <A11 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A12: FromRequest<Task<Args>> + Send, <A12 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A13: FromRequest<Task<Args>> + Send, <A13 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A14: FromRequest<Task<Args>> + Send, <A14 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A15: FromRequest<Task<Args>> + Send, <A15 as FromRequest<Task<Args>>>::Error: Error + 'static + Send + Sync, A16: FromRequest<Task<Args>> + Send, <A16 as FromRequest<Task<Args>>>::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>) -> Self::Future

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

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

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>) -> Self::Future

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

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

Source§

type Response = <S as Service<Task<Args>>>::Response

Responses given by the service.
Source§

type Error = <S as Service<Task<Args>>>::Error

Errors produced by the service.
Source§

type Future = <S as Service<Task<Args>>>::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>) -> Self::Future

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

impl<S, Args, Fut, T, Executor, ExecErr> Service<Task<Args>> for ParallelizeService<S, Executor>
where S: Service<Task<Args>, Future = Fut>, Executor: Fn(Fut) -> T + Send + 'static, Fut: Future<Output = Result<S::Response, S::Error>> + Send + 'static, T: Future<Output = Result<Result<S::Response, S::Error>, ExecErr>> + Send + 'static, S::Error: Into<BoxDynError> + Send + 'static, ExecErr: Into<BoxDynError>, S::Response: Send + 'static,

Source§

type Response = <S as Service<Task<Args>>>::Response

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<<ParallelizeService<S, Executor> as Service<Task<Args>>>::Response, <ParallelizeService<S, Executor> as Service<Task<Args>>>::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, request: Task<Args>) -> Self::Future

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

impl<S, Args> Service<Task<Args>> for LifecycleService<S>
where S: Service<Task<Args>>, S::Error: Into<BoxDynError>,

Source§

type Response = <S as Service<Task<Args>>>::Response

Responses given by the service.
Source§

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

Errors produced by the service.
Source§

type Future = LifecycleFuture<<S as Service<Task<Args>>>::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>) -> Self::Future

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

impl<B, Err> Sink<Task<<B as WireFormatBackend>::Compact>> for Shared<B>
where B: Backend<Error = Err> + Sink<Task<B::Compact>, Error = Err> + Unpin + WireFormatBackend, B::Codec: Unpin, B::Compact: Unpin,

Source§

type Error = Err

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

fn start_send( self: Pin<&mut Self>, item: Task<B::Compact>, ) -> 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_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 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<P> Sink<Task<<P as Persistence>::Compact>> for Persisted<P>
where P: Persistence + Unpin, P::Compact: Send + Unpin + 'static,

Available on crate feature sleep only.
Source§

type Error = <P as Persistence>::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<P::Compact>, ) -> 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, DB, Fetch, S, Config> Sink<Task<Args>> for CustomBackend<Args, DB, Fetch, S, Config>
where S: Sink<Task<Args>>, S::Error: Into<BoxDynError>,

Source§

type Error = CustomBackendError

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>) -> 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> Sink<Task<Args>> for MemoryStorage<Args>

Source§

type Error = MemoryStorageError

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>) -> 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> Sink<Task<Args>> for MemorySink<Args>

Source§

type Error = MemoryStorageError

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>) -> 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<T> Sink<Task<T>> for VecDequeBackend<T>
where T: Send + Unpin + 'static,

Source§

type Error = VecDequeError

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<T>) -> 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> !RefUnwindSafe for Task<Args>

§

impl<Args> !UnwindSafe for Task<Args>

§

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

§

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

§

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

§

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

§

impl<Args> UnsafeUnpin for Task<Args>
where Args: UnsafeUnpin,

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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 = !

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

fn try_from(value: U) -> Result<T, !>

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