Skip to main content

RouterExt

Trait RouterExt 

Source
pub trait RouterExt<S> {
    // Required method
    fn finish(self) -> Router<S>;
}
Expand description

Extension trait to add a finish() method to Router

This provides a clear endpoint to router building, making the API more explicit.

Required Methods§

Source

fn finish(self) -> Router<S>

Finishes building the router and returns it

This is a no-op that just returns self, but makes the builder API more explicit.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<S> RouterExt<S> for Router<S>