pub struct DynUpgrade<P, Op, Extractors, S> { /* private fields */ }Expand description
Upgrade service for a non-streaming schema operation.
The body is collected under the operation’s
RequestBodyCollectionConfig, carried by
SelectedOperation, when the selected protocol asks for it, the input is read through the erased protocol handle from the request
extensions, and the output or error is serialized through the same handle.
Trait Implementations§
Source§impl<P, Op, Extractors, S: Clone> Clone for DynUpgrade<P, Op, Extractors, S>
impl<P, Op, Extractors, S: Clone> Clone for DynUpgrade<P, Op, Extractors, S>
Source§impl<P, Op, Extractors, B, S> Service<Request<B>> for DynUpgrade<P, Op, Extractors, S>where
Op: SchemaOperationShape,
Op::Input: DeserializableShape + Send + 'static,
Op::Output: SerializableStruct + Send + 'static,
Extractors: FromParts<P> + Send + 'static,
<Extractors as FromParts<P>>::Rejection: Display + IntoResponse<P>,
B: HttpBody + Send + 'static,
B::Data: Send,
B::Error: Error + Send + Sync + 'static,
S: Service<(Op::Input, Extractors), Response = Op::Output> + Clone + Send + 'static,
S::Error: HttpModeledError,
S::Future: Send + 'static,
impl<P, Op, Extractors, B, S> Service<Request<B>> for DynUpgrade<P, Op, Extractors, S>where
Op: SchemaOperationShape,
Op::Input: DeserializableShape + Send + 'static,
Op::Output: SerializableStruct + Send + 'static,
Extractors: FromParts<P> + Send + 'static,
<Extractors as FromParts<P>>::Rejection: Display + IntoResponse<P>,
B: HttpBody + Send + 'static,
B::Data: Send,
B::Error: Error + Send + Sync + 'static,
S: Service<(Op::Input, Extractors), Response = Op::Output> + Clone + Send + 'static,
S::Error: HttpModeledError,
S::Future: Send + 'static,
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<DynUpgrade<P, Op, Extractors, S> as Service<Request<B>>>::Response, <DynUpgrade<P, Op, Extractors, S> as Service<Request<B>>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<DynUpgrade<P, Op, Extractors, S> as Service<Request<B>>>::Response, <DynUpgrade<P, Op, Extractors, S> as Service<Request<B>>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl<P, Op, Extractors, S> Freeze for DynUpgrade<P, Op, Extractors, S>where
S: Freeze,
impl<P, Op, Extractors, S> RefUnwindSafe for DynUpgrade<P, Op, Extractors, S>
impl<P, Op, Extractors, S> Send for DynUpgrade<P, Op, Extractors, S>
impl<P, Op, Extractors, S> Sync for DynUpgrade<P, Op, Extractors, S>
impl<P, Op, Extractors, S> Unpin for DynUpgrade<P, Op, Extractors, S>
impl<P, Op, Extractors, S> UnsafeUnpin for DynUpgrade<P, Op, Extractors, S>where
S: UnsafeUnpin,
impl<P, Op, Extractors, S> UnwindSafe for DynUpgrade<P, Op, Extractors, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.
Source§impl<F, Op, Exts> OperationServiceExt<Op, Exts> for Fwhere
Op: OperationShape,
F: OperationService<Op, Exts>,
impl<F, Op, Exts> OperationServiceExt<Op, Exts> for Fwhere
Op: OperationShape,
F: OperationService<Op, Exts>,
§impl<T, Request> ServiceExt<Request> for Twhere
T: Service<Request> + ?Sized,
impl<T, Request> ServiceExt<Request> for Twhere
T: Service<Request> + ?Sized,
§fn ready(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
fn ready(&mut self) -> Ready<'_, Self, Request>where
Self: Sized,
Yields a mutable reference to the service when it is ready to accept a request.
§fn ready_oneshot(self) -> ReadyOneshot<Self, Request>where
Self: Sized,
fn ready_oneshot(self) -> ReadyOneshot<Self, Request>where
Self: Sized,
Yields the service when it is ready to accept a request.
§fn oneshot(self, req: Request) -> Oneshot<Self, Request>where
Self: Sized,
fn oneshot(self, req: Request) -> Oneshot<Self, Request>where
Self: Sized,
Consume this
Service, calling it with the provided request once it is ready.§fn and_then<F>(self, f: F) -> AndThen<Self, F>
fn and_then<F>(self, f: F) -> AndThen<Self, F>
Executes a new future after this service’s future resolves. This does
not alter the behaviour of the
poll_ready method. Read more§fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
Maps this service’s response value to a different value. This does not
alter the behaviour of the
poll_ready method. Read more§fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
Maps this service’s error value to a different value. This does not
alter the behaviour of the
poll_ready method. Read more§fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
Maps this service’s result type (
Result<Self::Response, Self::Error>)
to a different value, regardless of whether the future succeeds or
fails. Read more§fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
Composes a function in front of the service. Read more
§fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
Composes an asynchronous function after this service. Read more
§fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
Composes a function that transforms futures produced by the service. Read more