Struct Request

Source
pub struct Request<Args, Ctx> {
    pub args: Args,
    pub parts: Parts<Ctx>,
}
Expand description

Represents a job which can be serialized and executed

Fields§

§args: Args

The inner request part

§parts: Parts<Ctx>

Parts of the request eg id, attempts and context

Implementations§

Source§

impl<T, Ctx> Request<T, Ctx>

Source

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

Creates a new Request

Source

pub fn new_with_parts(args: T, parts: Parts<Ctx>) -> Self

Creates a request with all parts provided

Source

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

Creates a request with context provided

Source

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

Creates a request with data and context provided

Source

pub fn take_parts(self) -> (T, Parts<Ctx>)

Take the parts

Methods from Deref<Target = Extensions>§

Source

pub fn insert<T: Clone + Send + Sync + 'static>(&mut self, val: T) -> Option<T>

Insert a type into this Extensions.

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

§Example
let mut ext = Extensions::new();
assert!(ext.insert(5i32).is_none());
assert!(ext.insert(4u8).is_none());
assert_eq!(ext.insert(9i32), Some(5i32));
Source

pub fn get<T: Send + Sync + 'static>(&self) -> Option<&T>

Get a reference to a type previously inserted on this Extensions.

§Example
let mut ext = Extensions::new();
assert!(ext.get::<i32>().is_none());
ext.insert(5i32);

assert_eq!(ext.get::<i32>(), Some(&5i32));
Source

pub fn get_checked<T: Send + Sync + 'static>(&self) -> Result<&T, Error>

Get a checked reference to a type previously inserted on this Extensions.

§Example
let mut ext = Extensions::new();
assert!(ext.get_checked::<i32>().is_err());
ext.insert(5i32);

assert_eq!(ext.get_checked::<i32>(), Ok(&5i32));
Source

pub fn get_mut<T: Send + Sync + 'static>(&mut self) -> Option<&mut T>

Get a mutable reference to a type previously inserted on this Extensions.

§Example
let mut ext = Extensions::new();
ext.insert(String::from("Hello"));
ext.get_mut::<String>().unwrap().push_str(" World");

assert_eq!(ext.get::<String>().unwrap(), "Hello World");
Source

pub fn remove<T: Send + Sync + 'static>(&mut self) -> Option<T>

Remove a type from this Extensions.

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

§Example
let mut ext = Extensions::new();
ext.insert(5i32);
assert_eq!(ext.remove::<i32>(), Some(5i32));
assert!(ext.get::<i32>().is_none());
Source

pub fn clear(&mut self)

Clear the Extensions of all inserted extensions.

§Example
let mut ext = Extensions::new();
ext.insert(5i32);
ext.clear();

assert!(ext.get::<i32>().is_none());
Source

pub fn is_empty(&self) -> bool

Check whether the extension set is empty or not.

§Example
let mut ext = Extensions::new();
assert!(ext.is_empty());
ext.insert(5i32);
assert!(!ext.is_empty());
Source

pub fn len(&self) -> usize

Get the number of extensions available.

§Example
let mut ext = Extensions::new();
assert_eq!(ext.len(), 0);
ext.insert(5i32);
assert_eq!(ext.len(), 1);
Source

pub fn extend(&mut self, other: Self)

Extends self with another Extensions.

If an instance of a specific type exists in both, the one in self is overwritten with the one from other.

§Example
let mut ext_a = Extensions::new();
ext_a.insert(8u8);
ext_a.insert(16u16);

let mut ext_b = Extensions::new();
ext_b.insert(4u8);
ext_b.insert("hello");

ext_a.extend(ext_b);
assert_eq!(ext_a.len(), 3);
assert_eq!(ext_a.get::<u8>(), Some(&4u8));
assert_eq!(ext_a.get::<u16>(), Some(&16u16));
assert_eq!(ext_a.get::<&'static str>().copied(), Some("hello"));

Trait Implementations§

Source§

impl<T: Send + 'static + Sync> Backend<Request<T, ()>> for MemoryStorage<T>

Source§

type Stream = BackendStream<Pin<Box<dyn Stream<Item = Result<Option<Request<T, ()>>, Error>> + Send>>>

The stream to be produced by the backend
Source§

type Layer = Identity

Returns the final decoration of layers
Source§

type Codec = NoopCodec<Request<T, ()>>

Specifies the codec type used by the backend
Source§

fn poll(self, _worker: &Worker<Context>) -> Poller<Self::Stream>

Returns a poller that is ready for streaming
Source§

impl<T, Ctx> Backend<Request<T, Ctx>> for RequestStream<Request<T, Ctx>>

Source§

type Stream = Pin<Box<dyn Stream<Item = Result<Option<Request<T, Ctx>>, Error>> + Send>>

The stream to be produced by the backend
Source§

type Layer = Identity

Returns the final decoration of layers
Source§

type Codec = NoopCodec<Request<T, Ctx>>

Specifies the codec type used by the backend
Source§

fn poll(self, _worker: &Worker<Context>) -> Poller<Self::Stream>

Returns a poller that is ready for streaming
Source§

impl<Args: Clone, Ctx: Clone> Clone for Request<Args, Ctx>

Source§

fn clone(&self) -> Request<Args, Ctx>

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, Ctx: Debug> Debug for Request<Args, Ctx>

Source§

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

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

impl<Args: Default, Ctx: Default> Default for Request<Args, Ctx>

Source§

fn default() -> Request<Args, Ctx>

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

impl<T, Ctx> Deref for Request<T, Ctx>

Source§

type Target = Extensions

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl<T, Ctx> DerefMut for Request<T, Ctx>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<'de, Args, Ctx> Deserialize<'de> for Request<Args, Ctx>
where Args: Deserialize<'de>, Ctx: 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<Req, Ctx> FromRequest<Request<Req, Ctx>> for Attempt

Source§

fn from_request(req: &Request<Req, Ctx>) -> Result<Self, Error>

Perform the extraction.
Source§

impl<T: Clone + Send + Sync + 'static, Req, Ctx> FromRequest<Request<Req, Ctx>> for Data<T>

Source§

fn from_request(req: &Request<Req, Ctx>) -> Result<Self, Error>

Perform the extraction.
Source§

impl<Req, Ctx> FromRequest<Request<Req, Ctx>> for Namespace

Source§

fn from_request(req: &Request<Req, Ctx>) -> Result<Self, Error>

Perform the extraction.
Source§

impl<Req, Ctx> FromRequest<Request<Req, Ctx>> for TaskId

Source§

fn from_request(req: &Request<Req, Ctx>) -> Result<Self, Error>

Perform the extraction.
Source§

impl<Req, Ctx> FromRequest<Request<Req, Ctx>> for Worker<Context>

Source§

fn from_request(req: &Request<Req, Ctx>) -> Result<Self, Error>

Perform the extraction.
Source§

impl<Args, Ctx> Serialize for Request<Args, Ctx>
where Args: Serialize, Ctx: 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<SV, A, Req, Ctx, Cdc> Service<Request<Req, Ctx>> for AckService<SV, A, Req, Ctx, Cdc>
where SV: Service<Request<Req, Ctx>> + Send + 'static, SV::Error: Into<BoxDynError> + Send + 'static, SV::Future: Send + 'static, A: Ack<Req, SV::Response, Cdc, Context = Ctx> + Send + 'static + Clone, Req: 'static + Send, SV::Response: Send + Serialize, <A as Ack<Req, SV::Response, Cdc>>::Context: Send + Clone + 'static, Ctx: Clone,

Source§

type Response = <SV as Service<Request<Req, Ctx>>>::Response

Responses given by the service.
Source§

type Error = Error

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<<AckService<SV, A, Req, Ctx, Cdc> as Service<Request<Req, Ctx>>>::Response, <AckService<SV, A, Req, Ctx, Cdc> as Service<Request<Req, Ctx>>>::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: Request<Req, Ctx>) -> Self::Future

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

impl<S, T, Req, Ctx> Service<Request<Req, Ctx>> for AddExtension<S, T>
where S: Service<Request<Req, Ctx>>, T: Clone + Send + Sync + 'static,

Source§

type Response = <S as Service<Request<Req, Ctx>>>::Response

Responses given by the service.
Source§

type Error = <S as Service<Request<Req, Ctx>>>::Error

Errors produced by the service.
Source§

type Future = <S as Service<Request<Req, Ctx>>>::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, req: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, ()>
where T: FnMut(Req) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Map<F, fn(<F as Future>::Output) -> Result<R, E>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2)>
where T: FnMut(Req, A1, A2) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3)>
where T: FnMut(Req, A1, A2, A3) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4)>
where T: FnMut(Req, A1, A2, A3, A4) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4, A5> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4, A5)>
where T: FnMut(Req, A1, A2, A3, A4, A5) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, A5: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4, A5, A6> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4, A5, A6)>
where T: FnMut(Req, A1, A2, A3, A4, A5, A6) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, A5: FromRequest<Request<Req, Ctx>>, A6: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4, A5, A6, A7> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4, A5, A6, A7)>
where T: FnMut(Req, A1, A2, A3, A4, A5, A6, A7) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, A5: FromRequest<Request<Req, Ctx>>, A6: FromRequest<Request<Req, Ctx>>, A7: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4, A5, A6, A7, A8> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8)>
where T: FnMut(Req, A1, A2, A3, A4, A5, A6, A7, A8) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, A5: FromRequest<Request<Req, Ctx>>, A6: FromRequest<Request<Req, Ctx>>, A7: FromRequest<Request<Req, Ctx>>, A8: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4, A5, A6, A7, A8, A9> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9)>
where T: FnMut(Req, A1, A2, A3, A4, A5, A6, A7, A8, A9) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, A5: FromRequest<Request<Req, Ctx>>, A6: FromRequest<Request<Req, Ctx>>, A7: FromRequest<Request<Req, Ctx>>, A8: FromRequest<Request<Req, Ctx>>, A9: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)>
where T: FnMut(Req, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, A5: FromRequest<Request<Req, Ctx>>, A6: FromRequest<Request<Req, Ctx>>, A7: FromRequest<Request<Req, Ctx>>, A8: FromRequest<Request<Req, Ctx>>, A9: FromRequest<Request<Req, Ctx>>, A10: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)>
where T: FnMut(Req, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, A5: FromRequest<Request<Req, Ctx>>, A6: FromRequest<Request<Req, Ctx>>, A7: FromRequest<Request<Req, Ctx>>, A8: FromRequest<Request<Req, Ctx>>, A9: FromRequest<Request<Req, Ctx>>, A10: FromRequest<Request<Req, Ctx>>, A11: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)>
where T: FnMut(Req, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, A5: FromRequest<Request<Req, Ctx>>, A6: FromRequest<Request<Req, Ctx>>, A7: FromRequest<Request<Req, Ctx>>, A8: FromRequest<Request<Req, Ctx>>, A9: FromRequest<Request<Req, Ctx>>, A10: FromRequest<Request<Req, Ctx>>, A11: FromRequest<Request<Req, Ctx>>, A12: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)>
where T: FnMut(Req, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, A5: FromRequest<Request<Req, Ctx>>, A6: FromRequest<Request<Req, Ctx>>, A7: FromRequest<Request<Req, Ctx>>, A8: FromRequest<Request<Req, Ctx>>, A9: FromRequest<Request<Req, Ctx>>, A10: FromRequest<Request<Req, Ctx>>, A11: FromRequest<Request<Req, Ctx>>, A12: FromRequest<Request<Req, Ctx>>, A13: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)>
where T: FnMut(Req, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, A5: FromRequest<Request<Req, Ctx>>, A6: FromRequest<Request<Req, Ctx>>, A7: FromRequest<Request<Req, Ctx>>, A8: FromRequest<Request<Req, Ctx>>, A9: FromRequest<Request<Req, Ctx>>, A10: FromRequest<Request<Req, Ctx>>, A11: FromRequest<Request<Req, Ctx>>, A12: FromRequest<Request<Req, Ctx>>, A13: FromRequest<Request<Req, Ctx>>, A14: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)>
where T: FnMut(Req, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, A5: FromRequest<Request<Req, Ctx>>, A6: FromRequest<Request<Req, Ctx>>, A7: FromRequest<Request<Req, Ctx>>, A8: FromRequest<Request<Req, Ctx>>, A9: FromRequest<Request<Req, Ctx>>, A10: FromRequest<Request<Req, Ctx>>, A11: FromRequest<Request<Req, Ctx>>, A12: FromRequest<Request<Req, Ctx>>, A13: FromRequest<Request<Req, Ctx>>, A14: FromRequest<Request<Req, Ctx>>, A15: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)>
where T: FnMut(Req, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A1: FromRequest<Request<Req, Ctx>>, A2: FromRequest<Request<Req, Ctx>>, A3: FromRequest<Request<Req, Ctx>>, A4: FromRequest<Request<Req, Ctx>>, A5: FromRequest<Request<Req, Ctx>>, A6: FromRequest<Request<Req, Ctx>>, A7: FromRequest<Request<Req, Ctx>>, A8: FromRequest<Request<Req, Ctx>>, A9: FromRequest<Request<Req, Ctx>>, A10: FromRequest<Request<Req, Ctx>>, A11: FromRequest<Request<Req, Ctx>>, A12: FromRequest<Request<Req, Ctx>>, A13: FromRequest<Request<Req, Ctx>>, A14: FromRequest<Request<Req, Ctx>>, A15: FromRequest<Request<Req, Ctx>>, A16: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<T, F, Req, E, R, Ctx, A> Service<Request<Req, Ctx>> for ServiceFn<T, Req, Ctx, A>
where T: FnMut(Req, A) -> F, F: Future, F::Output: IntoResponse<Result = Result<R, E>>, A: FromRequest<Request<Req, Ctx>>, E: From<Error>,

Source§

type Response = R

Responses given by the service.
Source§

type Error = E

Errors produced by the service.
Source§

type Future = Either<Ready<Result<R, E>>, Map<F, fn(<F as Future>::Output) -> Result<R, E>>>

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: Request<Req, Ctx>) -> Self::Future

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

impl<S, Req, Ctx> Service<Request<Req, Ctx>> for TestEmitService<S>
where S: Service<Request<Req, Ctx>> + Send + 'static, S::Future: Send + 'static, Req: Send + 'static, S::Response: Debug + Send + Sync, S::Error: Error + Send, Ctx: Send + 'static,

Source§

type Response = <S as Service<Request<Req, Ctx>>>::Response

Responses given by the service.
Source§

type Error = <S as Service<Request<Req, Ctx>>>::Error

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<<TestEmitService<S> as Service<Request<Req, Ctx>>>::Response, <TestEmitService<S> as Service<Request<Req, Ctx>>>::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, req: Request<Req, Ctx>) -> Self::Future

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

impl<Ctx, Compact, S: Storage<Job = StepRequest<Compact, Index>> + Send + Clone + 'static, Input, Index> Service<Request<StepRequest<Compact, Index>, Ctx>> for StepService<Ctx, Compact, Input, S, Index>
where Compact: DeserializeOwned + Send + Clone + 'static, S::Error: Send + Sync + Error, Index: StepIndex + Send + Sync + 'static,

Source§

type Response = GoTo<Compact>

Responses given by the service.
Source§

type Error = Error

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<<StepService<Ctx, Compact, Input, S, Index> as Service<Request<StepRequest<Compact, Index>, Ctx>>>::Response, <StepService<Ctx, Compact, Input, S, Index> as Service<Request<StepRequest<Compact, Index>, Ctx>>>::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, req: Request<StepRequest<Compact, Index>, Ctx>, ) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

§

impl<Args, Ctx> Freeze for Request<Args, Ctx>
where Args: Freeze, Ctx: Freeze,

§

impl<Args, Ctx> !RefUnwindSafe for Request<Args, Ctx>

§

impl<Args, Ctx> Send for Request<Args, Ctx>
where Args: Send, Ctx: Send,

§

impl<Args, Ctx> Sync for Request<Args, Ctx>
where Args: Sync, Ctx: Sync,

§

impl<Args, Ctx> Unpin for Request<Args, Ctx>
where Args: Unpin, Ctx: Unpin,

§

impl<Args, Ctx> !UnwindSafe for Request<Args, Ctx>

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, 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 = 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

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