Skip to main content

IntoRouter

Trait IntoRouter 

Source
pub trait IntoRouter {
    // Required method
    fn into_router(self) -> Result<Router, Box<dyn StdError + Send + Sync>>;
}
Expand description

What the future given to App::run returns: a router, or why there is none.

Required Methods§

Source

fn into_router(self) -> Result<Router, Box<dyn StdError + Send + Sync>>

The router to serve, or why there is none.

§Errors

Fails with the error the application’s setup returned.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IntoRouter for Router

Source§

fn into_router(self) -> Result<Router, Box<dyn StdError + Send + Sync>>

Source§

impl<E: Into<Box<dyn StdError + Send + Sync>>> IntoRouter for Result<Router, E>

Source§

fn into_router(self) -> Result<Router, Box<dyn StdError + Send + Sync>>

Implementors§