Skip to main content

OpenApiRouteImpl

Struct OpenApiRouteImpl 

Source
pub struct OpenApiRouteImpl;
Expand description

Composes route selection as the path and method a document keys an operation by.

Trait Implementations§

Source§

impl Debug for OpenApiRouteImpl

Source§

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

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

impl Default for OpenApiRouteImpl

Source§

fn default() -> OpenApiRouteImpl

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

impl HttpSelectorAlg for OpenApiRouteImpl

Source§

type Selector = OpenApiSelector

The interpreter’s HTTP selector representation.
Source§

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

Interprets a request-method selector.
Source§

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

Interprets an exact path selector.
Source§

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

Interprets a path-prefix selector.
Source§

impl RouteAlg for OpenApiRouteImpl

Source§

type Route = OpenApiRoute

The interpreter’s composed route representation.
Source§

type Selector = OpenApiSelector

The selector applied to a route or endpoint.
Source§

type Endpoint = OpenApiEndpoint

The homogeneous endpoint representation lifted into routes.
Source§

fn initial(&self) -> OpenApiRoute

Returns the initial route.
Source§

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

Forms the coproduct of two routes.
Source§

fn precompose( &self, selector: OpenApiSelector, route: OpenApiRoute, ) -> OpenApiRoute

Precomposes a route with a selector.
Source§

fn lift(&self, endpoint: OpenApiEndpoint) -> OpenApiRoute

Lifts an endpoint into a route.
Source§

impl SelectorAlg for OpenApiRouteImpl

Source§

type Selector = OpenApiSelector

The interpreter’s selector representation.
Source§

fn identity(&self) -> OpenApiSelector

Returns the selector identity.
Source§

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

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<_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<This> ShapeProgramExt<This> for This

Source§

fn compile_shape<Program>( &self, program: Program, ) -> <Program as ShapeProgramAlg<This>>::Ty
where Program: ShapeProgramAlg<This>,

Folds a declaration with this interpretation.

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.