pub struct ActixHandlerImpl<Context> { /* private fields */ }Expand description
Interprets typed HTTP programs as executable actix-web routes.
Shared state reaches a handler as the semantic context the program already threads, not as
actix_web::Data, because a framework composing domain code is the inversion this design exists
to avoid.
Implementations§
Source§impl<Context> ActixHandlerImpl<Context>
impl<Context> ActixHandlerImpl<Context>
Trait Implementations§
Source§impl<Context> BytesOutAlg for ActixHandlerImpl<Context>
impl<Context> BytesOutAlg for ActixHandlerImpl<Context>
Source§type Bytes<From> = ActixBytesOutput
type Bytes<From> = ActixBytesOutput
The raw-byte converter selected for
From.Source§impl<Context> EmptyOutAlg for ActixHandlerImpl<Context>
impl<Context> EmptyOutAlg for ActixHandlerImpl<Context>
Source§type Empty<From> = ActixEmptyOutput
type Empty<From> = ActixEmptyOutput
The empty converter selected for
From.Source§impl<Context> FileOutAlg for ActixHandlerImpl<Context>
impl<Context> FileOutAlg for ActixHandlerImpl<Context>
Source§type File<From> = ActixFileOutput
type File<From> = ActixFileOutput
The streamed-file converter selected for
From.Source§impl<Context> HandlerAlg for ActixHandlerImpl<Context>
impl<Context> HandlerAlg for ActixHandlerImpl<Context>
Source§type Endpoint = ActixEndpoint
type Endpoint = ActixEndpoint
The interpreter’s homogeneous endpoint representation.
Source§impl<Context> HandlerContextAlg<Context> for ActixHandlerImpl<Context>
impl<Context> HandlerContextAlg<Context> for ActixHandlerImpl<Context>
Source§impl<Context, Inputs, Args, Transform, Answering, Output> HandlerEndpointAlg<Arc<Context>, Inputs, Args, Transform, Output> for ActixHandlerImpl<Context>where
Context: Send + Sync + 'static,
Inputs: ActixInputsAlg<Args> + 'static,
Args: 'static,
Output: 'static,
Transform: OutputKindAlg<Self, Output, Transform = Answering> + 'static,
Answering: OutputAlg<Output, Output = HttpResponse>,
impl<Context, Inputs, Args, Transform, Answering, Output> HandlerEndpointAlg<Arc<Context>, Inputs, Args, Transform, Output> for ActixHandlerImpl<Context>where
Context: Send + Sync + 'static,
Inputs: ActixInputsAlg<Args> + 'static,
Args: 'static,
Output: 'static,
Transform: OutputKindAlg<Self, Output, Transform = Answering> + 'static,
Answering: OutputAlg<Output, Output = HttpResponse>,
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 ActixHandlerImpl<Context>
impl<Context> HeaderOutAlg for ActixHandlerImpl<Context>
Source§type Header<Inner, Name> = ActixHeaderOutput<Inner, Name>
type Header<Inner, Name> = ActixHeaderOutput<Inner, Name>
The converter writing
Name beside the body Inner states.Source§impl<Context> HtmlOutAlg for ActixHandlerImpl<Context>
impl<Context> HtmlOutAlg for ActixHandlerImpl<Context>
Source§type Html<From> = ActixHtmlOutput
type Html<From> = ActixHtmlOutput
The HTML converter selected for
From.Source§impl<Context> HttpInputAlg for ActixHandlerImpl<Context>
impl<Context> HttpInputAlg for ActixHandlerImpl<Context>
Source§type Path<I> = ActixPathInput<I>
type Path<I> = ActixPathInput<I>
The interpreter’s path extractor for
Input.Source§type Query<I> = ActixQueryInput<I>
type Query<I> = ActixQueryInput<I>
The interpreter’s query extractor for
Input.Source§type Body<I> = ActixBodyInput<I>
type Body<I> = ActixBodyInput<I>
The interpreter’s request-body extractor for
Input.Source§type Form<I> = ActixFormInput<I>
type Form<I> = ActixFormInput<I>
The interpreter’s form-encoded request-body extractor for
Input.Source§type Multipart<I> = ActixMultipartInput<I>
type Multipart<I> = ActixMultipartInput<I>
The interpreter’s extractor for
Input read from a body arriving as parts.Source§type RawBody<I> = ActixRequestInput<I>
type RawBody<I> = ActixRequestInput<I>
The interpreter’s unread request-body extractor for
Input.Source§type Header<I> = ActixHeaderInput<I>
type Header<I> = ActixHeaderInput<I>
The interpreter’s header extractor for
Input. Read moreSource§type Cookie<I> = ActixCookieInput<I>
type Cookie<I> = ActixCookieInput<I>
The interpreter’s cookie extractor for
Input.Source§type Auth<I> = ActixHeaderInput<I>
type Auth<I> = ActixHeaderInput<I>
The interpreter’s authentication extractor for
Input.Source§type Context<I> = ActixRequestInput<I>
type Context<I> = ActixRequestInput<I>
The interpreter’s endpoint-context extractor for
Input.Source§impl<Context> HttpSelectorAlg for ActixHandlerImpl<Context>
impl<Context> HttpSelectorAlg for ActixHandlerImpl<Context>
Source§type Selector = ActixSelector
type Selector = ActixSelector
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 ActixHandlerImpl<Context>
impl<Context> JsonOutAlg for ActixHandlerImpl<Context>
Source§type Json<From> = ActixJsonOutput
type Json<From> = ActixJsonOutput
The JSON converter selected for
From.Source§impl<Context> RedirectOutAlg for ActixHandlerImpl<Context>
impl<Context> RedirectOutAlg for ActixHandlerImpl<Context>
Source§type Redirect<From> = ActixRedirectOutput
type Redirect<From> = ActixRedirectOutput
The redirect converter selected for
From.Source§impl<Context> ResultOutAlg for ActixHandlerImpl<Context>
impl<Context> ResultOutAlg for ActixHandlerImpl<Context>
Source§type Result<Inner, Error> = ActixResultOutput<Inner, Error>
type Result<Inner, Error> = ActixResultOutput<Inner, Error>
The converter answering with
Inner on success and with what Error means otherwise.Source§impl<Context> RouteAlg for ActixHandlerImpl<Context>
impl<Context> RouteAlg for ActixHandlerImpl<Context>
Source§type Route = ActixRoute
type Route = ActixRoute
The interpreter’s composed route representation.
Source§type Selector = ActixSelector
type Selector = ActixSelector
The selector applied to a route or endpoint.
Source§type Endpoint = ActixEndpoint
type Endpoint = ActixEndpoint
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 ActixHandlerImpl<Context>
impl<Context> SelectorAlg for ActixHandlerImpl<Context>
Source§impl<Context> StatusOutAlg for ActixHandlerImpl<Context>
impl<Context> StatusOutAlg for ActixHandlerImpl<Context>
Source§type Status<Inner, const CODE: u16> = ActixStatusOutput<Inner, CODE>
type Status<Inner, const CODE: u16> = ActixStatusOutput<Inner, CODE>
The converter answering with
CODE and the body Inner states.Source§impl<Context> StreamOutAlg for ActixHandlerImpl<Context>
impl<Context> StreamOutAlg for ActixHandlerImpl<Context>
Source§type Stream<From> = ActixStreamOutput
type Stream<From> = ActixStreamOutput
The streamed converter selected for
From.Source§impl<Context> TextOutAlg for ActixHandlerImpl<Context>
impl<Context> TextOutAlg for ActixHandlerImpl<Context>
Source§type Text<From> = ActixTextOutput
type Text<From> = ActixTextOutput
The plain-text converter selected for
From.Auto Trait Implementations§
impl<Context> Freeze for ActixHandlerImpl<Context>
impl<Context> RefUnwindSafe for ActixHandlerImpl<Context>where
Arc<Context>: RefUnwindSafe,
impl<Context> Send for ActixHandlerImpl<Context>
impl<Context> Sync for ActixHandlerImpl<Context>
impl<Context> Unpin for ActixHandlerImpl<Context>
impl<Context> UnsafeUnpin for ActixHandlerImpl<Context>where
Arc<Context>: UnsafeUnpin,
impl<Context> UnwindSafe for ActixHandlerImpl<Context>where
Arc<Context>: UnwindSafe,
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.