pub struct OpenApiHandlerImpl<Context> { /* private fields */ }Expand description
Interprets typed HTTP programs as the OpenAPI document that describes them.
Nothing is applied. Every endpoint is read for what a caller would have to state and what it would be answered with, which is why this interpretation asks for shapes where the others ask for extractors.
Implementations§
Source§impl<Context> OpenApiHandlerImpl<Context>
impl<Context> OpenApiHandlerImpl<Context>
Trait Implementations§
Source§impl<Context> BytesOutAlg for OpenApiHandlerImpl<Context>
impl<Context> BytesOutAlg for OpenApiHandlerImpl<Context>
Source§type Bytes<From> = OpenApiBytesOutput
type Bytes<From> = OpenApiBytesOutput
The raw-byte converter selected for
From.Source§impl<Context> Default for OpenApiHandlerImpl<Context>
impl<Context> Default for OpenApiHandlerImpl<Context>
Source§impl<Context> EmptyOutAlg for OpenApiHandlerImpl<Context>
impl<Context> EmptyOutAlg for OpenApiHandlerImpl<Context>
Source§type Empty<From> = OpenApiEmptyOutput
type Empty<From> = OpenApiEmptyOutput
The empty converter selected for
From.Source§impl<Context> FileOutAlg for OpenApiHandlerImpl<Context>
impl<Context> FileOutAlg for OpenApiHandlerImpl<Context>
Source§type File<From> = OpenApiFileOutput
type File<From> = OpenApiFileOutput
The streamed-file converter selected for
From.Source§impl<Context> HandlerAlg for OpenApiHandlerImpl<Context>
impl<Context> HandlerAlg for OpenApiHandlerImpl<Context>
Source§type Endpoint = OpenApiEndpoint
type Endpoint = OpenApiEndpoint
The interpreter’s homogeneous endpoint representation.
Source§impl<Context> HandlerContextAlg<Context> for OpenApiHandlerImpl<Context>
impl<Context> HandlerContextAlg<Context> for OpenApiHandlerImpl<Context>
Source§impl<Context, Inputs, Args, Transform, Answering, Output> HandlerEndpointAlg<Arc<Context>, Inputs, Args, Transform, Output> for OpenApiHandlerImpl<Context>where
Context: Send + Sync + 'static,
Inputs: OpenApiInputsAlg,
Transform: OutputKindAlg<Self, Output, Transform = Answering>,
Answering: OpenApiOutputAlg<Output>,
impl<Context, Inputs, Args, Transform, Answering, Output> HandlerEndpointAlg<Arc<Context>, Inputs, Args, Transform, Output> for OpenApiHandlerImpl<Context>where
Context: Send + Sync + 'static,
Inputs: OpenApiInputsAlg,
Transform: OutputKindAlg<Self, Output, Transform = Answering>,
Answering: OpenApiOutputAlg<Output>,
Source§fn finish_handler<Handler>(
&self,
_handler: Handler,
) -> <Self as HandlerAlg>::Endpointwhere
Handler: OperationAlg + ApplyAlg<Arc<Context>, Args, Output = Output> + Send + Sync + 'static,
fn finish_handler<Handler>(
&self,
_handler: Handler,
) -> <Self as HandlerAlg>::Endpointwhere
Handler: OperationAlg + ApplyAlg<Arc<Context>, Args, Output = Output> + Send + Sync + 'static,
Interprets a typed first-order handler as a concrete endpoint. Read more
Source§impl<Context> HeaderOutAlg for OpenApiHandlerImpl<Context>
impl<Context> HeaderOutAlg for OpenApiHandlerImpl<Context>
Source§type Header<Inner, Name> = OpenApiHeaderOutput<Inner, Name>
type Header<Inner, Name> = OpenApiHeaderOutput<Inner, Name>
The converter writing
Name beside the body Inner states.Source§impl<Context> HtmlOutAlg for OpenApiHandlerImpl<Context>
impl<Context> HtmlOutAlg for OpenApiHandlerImpl<Context>
Source§type Html<From> = OpenApiHtmlOutput
type Html<From> = OpenApiHtmlOutput
The HTML converter selected for
From.Source§impl<Context> HttpInputAlg for OpenApiHandlerImpl<Context>
impl<Context> HttpInputAlg for OpenApiHandlerImpl<Context>
Source§type Path<I> = OpenApiPathInput<I>
type Path<I> = OpenApiPathInput<I>
The interpreter’s path extractor for
Input.Source§type Query<I> = OpenApiQueryInput<I>
type Query<I> = OpenApiQueryInput<I>
The interpreter’s query extractor for
Input.Source§type Body<I> = OpenApiBodyInput<I>
type Body<I> = OpenApiBodyInput<I>
The interpreter’s request-body extractor for
Input.Source§type Form<I> = OpenApiFormInput<I>
type Form<I> = OpenApiFormInput<I>
The interpreter’s form-encoded request-body extractor for
Input.Source§type Multipart<I> = OpenApiMultipartInput<I>
type Multipart<I> = OpenApiMultipartInput<I>
The interpreter’s extractor for
Input read from a body arriving as parts.Source§type RawBody<I> = OpenApiRawBodyInput<I>
type RawBody<I> = OpenApiRawBodyInput<I>
The interpreter’s unread request-body extractor for
Input.Source§type Header<I> = OpenApiHeaderInput<I>
type Header<I> = OpenApiHeaderInput<I>
The interpreter’s header extractor for
Input. Read moreSource§type Cookie<I> = OpenApiCookieInput<I>
type Cookie<I> = OpenApiCookieInput<I>
The interpreter’s cookie extractor for
Input.Source§type Auth<I> = OpenApiHeaderInput<I>
type Auth<I> = OpenApiHeaderInput<I>
The interpreter’s authentication extractor for
Input.Source§type Context<I> = OpenApiUnstatedInput<I>
type Context<I> = OpenApiUnstatedInput<I>
The interpreter’s endpoint-context extractor for
Input.Source§impl<Context> HttpSelectorAlg for OpenApiHandlerImpl<Context>
impl<Context> HttpSelectorAlg for OpenApiHandlerImpl<Context>
Source§type Selector = OpenApiSelector
type Selector = OpenApiSelector
The interpreter’s HTTP selector representation.
Source§fn http_method(&self, method: HttpMethod) -> Self::Selector
fn http_method(&self, method: HttpMethod) -> Self::Selector
Interprets a request-method selector.
Source§fn http_prefix(&self, prefix: &RoutePath) -> Self::Selector
fn http_prefix(&self, prefix: &RoutePath) -> Self::Selector
Interprets a path-prefix selector.
Source§impl<Context> JsonOutAlg for OpenApiHandlerImpl<Context>
impl<Context> JsonOutAlg for OpenApiHandlerImpl<Context>
Source§type Json<From> = OpenApiJsonOutput
type Json<From> = OpenApiJsonOutput
The JSON converter selected for
From.Source§impl<Context> RedirectOutAlg for OpenApiHandlerImpl<Context>
impl<Context> RedirectOutAlg for OpenApiHandlerImpl<Context>
Source§type Redirect<From> = OpenApiRedirectOutput
type Redirect<From> = OpenApiRedirectOutput
The redirect converter selected for
From.Source§impl<Context> ResultOutAlg for OpenApiHandlerImpl<Context>
impl<Context> ResultOutAlg for OpenApiHandlerImpl<Context>
Source§type Result<Inner, Error> = OpenApiResultOutput<Inner, Error>
type Result<Inner, Error> = OpenApiResultOutput<Inner, Error>
The converter answering with
Inner on success and with what Error means otherwise.Source§impl<Context> RouteAlg for OpenApiHandlerImpl<Context>
impl<Context> RouteAlg for OpenApiHandlerImpl<Context>
Source§type Route = OpenApiRoute
type Route = OpenApiRoute
The interpreter’s composed route representation.
Source§type Selector = OpenApiSelector
type Selector = OpenApiSelector
The selector applied to a route or endpoint.
Source§type Endpoint = OpenApiEndpoint
type Endpoint = OpenApiEndpoint
The homogeneous endpoint representation lifted into routes.
Source§fn coproduct(&self, left: Self::Route, right: Self::Route) -> Self::Route
fn coproduct(&self, left: Self::Route, right: Self::Route) -> Self::Route
Forms the coproduct of two routes.
Source§impl<Context> SelectorAlg for OpenApiHandlerImpl<Context>
impl<Context> SelectorAlg for OpenApiHandlerImpl<Context>
Source§impl<Context> StatusOutAlg for OpenApiHandlerImpl<Context>
impl<Context> StatusOutAlg for OpenApiHandlerImpl<Context>
Source§type Status<Inner, const CODE: u16> = OpenApiStatusOutput<Inner, CODE>
type Status<Inner, const CODE: u16> = OpenApiStatusOutput<Inner, CODE>
The converter answering with
CODE and the body Inner states.Source§impl<Context> StreamOutAlg for OpenApiHandlerImpl<Context>
impl<Context> StreamOutAlg for OpenApiHandlerImpl<Context>
Source§type Stream<From> = OpenApiStreamOutput
type Stream<From> = OpenApiStreamOutput
The streamed converter selected for
From.Source§impl<Context> TextOutAlg for OpenApiHandlerImpl<Context>
impl<Context> TextOutAlg for OpenApiHandlerImpl<Context>
Source§type Text<From> = OpenApiTextOutput
type Text<From> = OpenApiTextOutput
The plain-text converter selected for
From.Auto Trait Implementations§
impl<Context> !Freeze for OpenApiHandlerImpl<Context>
impl<Context> !RefUnwindSafe for OpenApiHandlerImpl<Context>
impl<Context> !Sync for OpenApiHandlerImpl<Context>
impl<Context> Send for OpenApiHandlerImpl<Context>
impl<Context> Unpin for OpenApiHandlerImpl<Context>
impl<Context> UnsafeUnpin for OpenApiHandlerImpl<Context>
impl<Context> UnwindSafe for OpenApiHandlerImpl<Context>
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
impl<_INNER> HttpApiAlg for _INNERwhere
_INNER: HandlerAlg + HttpInputAlg + HttpRouteAlg<Endpoint = <_INNER as HandlerAlg>::Endpoint> + RouteAlg,
Source§impl<This> HttpProgramExt<This> for This
impl<This> HttpProgramExt<This> for This
Source§fn compile_http<Program>(
&self,
program: Program,
) -> <Program as HttpProgramAlg<This>>::Routewhere
Program: HttpProgramAlg<This>,
fn compile_http<Program>(
&self,
program: Program,
) -> <Program as HttpProgramAlg<This>>::Routewhere
Program: HttpProgramAlg<This>,
Compiles a named HTTP program with this interpreter.
impl<_INNER> HttpRouteAlg for _INNERwhere
_INNER: HttpSelectorAlg<Selector = <_INNER as SelectorAlg>::Selector> + RouteAlg<Selector = <_INNER as SelectorAlg>::Selector> + SelectorAlg,
Source§impl<This> RouteAlgExt<This> for Thiswhere
This: RouteAlg,
impl<This> RouteAlgExt<This> for Thiswhere
This: RouteAlg,
Source§impl<This> ShapeProgramExt<This> for This
impl<This> ShapeProgramExt<This> for This
Source§fn compile_shape<Program>(
&self,
program: Program,
) -> <Program as ShapeProgramAlg<This>>::Tywhere
Program: ShapeProgramAlg<This>,
fn compile_shape<Program>(
&self,
program: Program,
) -> <Program as ShapeProgramAlg<This>>::Tywhere
Program: ShapeProgramAlg<This>,
Folds a declaration with this interpretation.