Skip to main content

TextHandlerImpl

Struct TextHandlerImpl 

Source
pub struct TextHandlerImpl;
Expand description

Interprets typed APIs as text descriptions.

Trait Implementations§

Source§

impl BytesOutAlg for TextHandlerImpl

Source§

type Bytes<From> = TextBytesOutput

The raw-byte converter selected for From.
Source§

impl Debug for TextHandlerImpl

Source§

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

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

impl Default for TextHandlerImpl

Source§

fn default() -> TextHandlerImpl

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

impl EmptyOutAlg for TextHandlerImpl

Source§

type Empty<From> = TextEmptyOutput

The empty converter selected for From.
Source§

impl FileOutAlg for TextHandlerImpl

Source§

type File<From> = TextFileOutput

The streamed-file converter selected for From.
Source§

impl HandlerAlg for TextHandlerImpl

Source§

type Endpoint = TextEndpoint

The interpreter’s homogeneous endpoint representation.
Source§

impl<Context> HandlerContextAlg<Context> for TextHandlerImpl
where Context: Send + Sync + 'static,

Source§

type Handle = Arc<Context>

The owned carrier cloned into asynchronous operation invocations.
Source§

impl<Context, Inputs, Args, Transform, Answering, Answered, Output> HandlerEndpointAlg<Context, Inputs, Args, Transform, Output> for TextHandlerImpl
where Transform: OutputKindAlg<TextHandlerImpl, Output, Transform = Answering>, Answering: OutputAlg<Output, Output = Answered>,

Source§

fn finish_handler<Handler>(&self, _handler: Handler) -> TextEndpoint
where Handler: OperationAlg + ApplyAlg<Context, Args, Output = Output> + Send + Sync + 'static,

Interprets a typed first-order handler as a concrete endpoint. Read more
Source§

impl HeaderOutAlg for TextHandlerImpl

Source§

type Header<Inner, Name> = TextHeaderOutput<Inner, Name>

The converter writing Name beside the body Inner states.
Source§

impl HtmlOutAlg for TextHandlerImpl

Source§

type Html<From> = TextHtmlOutput

The HTML converter selected for From.
Source§

impl HttpInputAlg for TextHandlerImpl

Source§

type Path<Input> = TextInputRole<PathRole, Input>

The interpreter’s path extractor for Input.
Source§

type Query<Input> = TextInputRole<QueryRole, Input>

The interpreter’s query extractor for Input.
Source§

type Body<Input> = TextInputRole<BodyRole, Input>

The interpreter’s request-body extractor for Input.
Source§

type Form<Input> = TextInputRole<FormRole, Input>

The interpreter’s form-encoded request-body extractor for Input.
Source§

type Multipart<Input> = TextInputRole<MultipartRole, Input>

The interpreter’s extractor for Input read from a body arriving as parts.
Source§

type RawBody<Input> = TextInputRole<RawBodyRole, Input>

The interpreter’s unread request-body extractor for Input.
Source§

type Header<Input> = TextInputRole<HeaderRole, Input>

The interpreter’s header extractor for Input. Read more
Source§

type Cookie<Input> = TextInputRole<CookieRole, Input>

The interpreter’s cookie extractor for Input.
Source§

type Auth<Input> = TextInputRole<AuthRole, Input>

The interpreter’s authentication extractor for Input.
Source§

type Context<Input> = TextInputRole<ContextRole, Input>

The interpreter’s endpoint-context extractor for Input.
Source§

impl HttpSelectorAlg for TextHandlerImpl

Source§

type Selector = TextSelector

The interpreter’s HTTP selector representation.
Source§

fn http_method(&self, method: HttpMethod) -> TextSelector

Interprets a request-method selector.
Source§

fn http_path(&self, path: &RoutePath) -> TextSelector

Interprets an exact path selector.
Source§

fn http_prefix(&self, prefix: &RoutePath) -> TextSelector

Interprets a path-prefix selector.
Source§

impl JsonOutAlg for TextHandlerImpl

Source§

type Json<From> = TextJsonOutput

The JSON converter selected for From.
Source§

impl RedirectOutAlg for TextHandlerImpl

Source§

type Redirect<From> = TextRedirectOutput

The redirect converter selected for From.
Source§

impl ResultOutAlg for TextHandlerImpl

Source§

type Result<Inner, Error> = TextResultOutput<Inner, Error>

The converter answering with Inner on success and with what Error means otherwise.
Source§

impl RouteAlg for TextHandlerImpl

Source§

type Route = TextRoute

The interpreter’s composed route representation.
Source§

type Selector = TextSelector

The selector applied to a route or endpoint.
Source§

type Endpoint = TextEndpoint

The homogeneous endpoint representation lifted into routes.
Source§

fn initial(&self) -> TextRoute

Returns the initial route.
Source§

fn coproduct(&self, left: TextRoute, right: TextRoute) -> TextRoute

Forms the coproduct of two routes.
Source§

fn precompose(&self, selector: TextSelector, route: TextRoute) -> TextRoute

Precomposes a route with a selector.
Source§

fn lift(&self, endpoint: TextEndpoint) -> TextRoute

Lifts an endpoint into a route.
Source§

impl SelectorAlg for TextHandlerImpl

Source§

type Selector = TextSelector

The interpreter’s selector representation.
Source§

fn identity(&self) -> TextSelector

Returns the selector identity.
Source§

fn compose(&self, first: TextSelector, second: TextSelector) -> TextSelector

Composes two selectors from left to right.
Source§

impl StatusOutAlg for TextHandlerImpl

Source§

type Status<Inner, const CODE: u16> = TextStatusOutput<Inner, CODE>

The converter answering with CODE and the body Inner states.
Source§

impl StreamOutAlg for TextHandlerImpl

Source§

type Stream<From> = TextStreamOutput

The streamed converter selected for From.
Source§

impl TextOutAlg for TextHandlerImpl

Source§

type Text<From> = TextTextOutput

The plain-text converter selected for From.

Auto Trait Implementations§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<_INNER> HttpApiAlg for _INNER
where _INNER: HandlerAlg + HttpInputAlg + HttpRouteAlg<Endpoint = <_INNER as HandlerAlg>::Endpoint> + RouteAlg,

Source§

impl<This> HttpProgramExt<This> for This

Source§

fn compile_http<Program>( &self, program: Program, ) -> <Program as HttpProgramAlg<This>>::Route
where Program: HttpProgramAlg<This>,

Compiles a named HTTP program with this interpreter.

Source§

impl<_INNER> HttpRouteAlg for _INNER
where _INNER: HttpSelectorAlg<Selector = <_INNER as SelectorAlg>::Selector> + RouteAlg<Selector = <_INNER as SelectorAlg>::Selector> + SelectorAlg,

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<This> RouteAlgExt<This> for This
where This: RouteAlg,

Source§

fn routes(&self) -> Routes<'_, This>

Starts with the initial route.

Source§

fn route(&self, route: <This as RouteAlg>::Route) -> Routes<'_, This>

Wraps an already interpreted route for further fluent composition.

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.