pub trait Routable<T>: Send + Syncwhere
    T: CapabilityBound,{
    // Required method
    fn route<'life0, 'async_trait>(
        &'life0 self,
        request: Option<Request>,
        debug: bool,
    ) -> Pin<Box<dyn Future<Output = Result<RouterResponse<T>, RouterError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}Expand description
Types that implement Routable let the holder asynchronously request capabilities
from them.
Required Methods§
fn route<'life0, 'async_trait>(
    &'life0 self,
    request: Option<Request>,
    debug: bool,
) -> Pin<Box<dyn Future<Output = Result<RouterResponse<T>, RouterError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Implementors§
impl<T: CapabilityBound> Routable<T> for Router<T>
impl<T: CapabilityBound, F> Routable<T> for Fwhere
    F: Fn(Option<Request>, bool) -> BoxFuture<'static, Result<RouterResponse<T>, RouterError>> + Send + Sync + 'static,
Syntax sugar within the framework to express custom routing logic using a function that takes a request and returns such future.