Trait RouterExt

Source
pub trait RouterExt<AppState: 'static> {
    // Required method
    fn tapi<E: Endpoint<AppState> + ?Sized>(self, endpoint: &E) -> Self;

    // Provided method
    fn tapis<'a>(
        self,
        endpoints: impl IntoIterator<Item = &'a dyn Endpoint<AppState>>,
    ) -> Self
       where Self: Sized { ... }
}

Required Methods§

Source

fn tapi<E: Endpoint<AppState> + ?Sized>(self, endpoint: &E) -> Self

Provided Methods§

Source

fn tapis<'a>( self, endpoints: impl IntoIterator<Item = &'a dyn Endpoint<AppState>>, ) -> Self
where Self: Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<AppState: 'static> RouterExt<AppState> for Router<AppState>

Source§

fn tapi<E: Endpoint<AppState> + ?Sized>(self, endpoint: &E) -> Self

Implementors§