pub trait RouteAlg {
type Route;
type Selector;
type Endpoint;
// Required methods
fn initial(&self) -> Self::Route;
fn coproduct(&self, left: Self::Route, right: Self::Route) -> Self::Route;
fn precompose(
&self,
selector: Self::Selector,
route: Self::Route,
) -> Self::Route;
fn lift(&self, endpoint: Self::Endpoint) -> Self::Route;
}Expand description
Describes categorical construction and composition of routes.
Required Associated Types§
Required Methods§
Sourcefn 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.
Sourcefn precompose(
&self,
selector: Self::Selector,
route: Self::Route,
) -> Self::Route
fn precompose( &self, selector: Self::Selector, route: Self::Route, ) -> Self::Route
Precomposes a route with a selector.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".