Skip to main content

TextHandlerImpl

Struct TextHandlerImpl 

Source
pub struct TextHandlerImpl;
Expand description

Interprets typed APIs as text descriptions.

Trait Implementations§

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 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, Output> HandlerEndpointAlg<Context, Inputs, Args, Transform, Output> for TextHandlerImpl
where Transform: OutputKindAlg<TextHandlerImpl, Output>,

Source§

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

Interprets a typed first-order handler as a concrete endpoint. Read more
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 Header<Input> = TextInputRole<HeaderRole, Input>

The interpreter’s header 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_get(&self) -> TextSelector

Interprets the GET method selector.
Source§

fn http_post(&self) -> TextSelector

Interprets the POST method selector.
Source§

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

Interprets an exact path selector.
Source§

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

Interprets a path-prefix selector.
Source§

impl JsonOutAlg for TextHandlerImpl

Source§

type Json<From> = TextJsonOutput

The JSON converter selected for From.
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.

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<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<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 = 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.