Skip to main content

DirectRouteImpl

Struct DirectRouteImpl 

Source
pub struct DirectRouteImpl;
Expand description

Interprets categorical route composition as the only routing this interpretation needs.

Trait Implementations§

Source§

impl Debug for DirectRouteImpl

Source§

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

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

impl Default for DirectRouteImpl

Source§

fn default() -> DirectRouteImpl

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

impl HttpSelectorAlg for DirectRouteImpl

Source§

type Selector = DirectSelector

The interpreter’s HTTP selector representation.
Source§

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

Interprets a request-method selector.
Source§

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

Interprets an exact path selector.
Source§

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

Interprets a path-prefix selector.
Source§

impl RouteAlg for DirectRouteImpl

Source§

type Route = DirectRoute

The interpreter’s composed route representation.
Source§

type Selector = DirectSelector

The selector applied to a route or endpoint.
Source§

type Endpoint = DirectEndpoint

The homogeneous endpoint representation lifted into routes.
Source§

fn initial(&self) -> DirectRoute

Returns the initial route.
Source§

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

Forms the coproduct of two routes.
Source§

fn precompose( &self, selector: DirectSelector, route: DirectRoute, ) -> DirectRoute

Precomposes a route with a selector.
Source§

fn lift(&self, endpoint: DirectEndpoint) -> DirectRoute

Lifts an endpoint into a route.
Source§

impl SelectorAlg for DirectRouteImpl

Source§

type Selector = DirectSelector

The interpreter’s selector representation.
Source§

fn identity(&self) -> DirectSelector

Returns the selector identity.
Source§

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

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