[−][src]Struct roa::router::Router
This is supported on
feature="router"
only.A builder of RouteTable
.
Methods
impl<S> Router<S> where
S: 'static,
[src]
S: 'static,
pub fn new() -> Self
[src]
This is supported on
feature="router"
only.Construct a new router.
pub fn on(
self,
path: &'static str,
endpoint: impl for<'a> Endpoint<'a, S>
) -> Self
[src]
self,
path: &'static str,
endpoint: impl for<'a> Endpoint<'a, S>
) -> Self
This is supported on
feature="router"
only.Register a new endpoint.
pub fn include(self, prefix: &'static str, router: Router<S>) -> Self
[src]
This is supported on
feature="router"
only.Include another router with prefix.
pub fn gate(self, next: impl for<'a> Middleware<'a, S>) -> Router<S>
[src]
This is supported on
feature="router"
only.Chain a middleware to Router::middleware.
pub fn routes(
self,
prefix: &'static str
) -> StdResult<RouteTable<S>, RouterError>
[src]
self,
prefix: &'static str
) -> StdResult<RouteTable<S>, RouterError>
This is supported on
feature="router"
only.Build RouteTable with path prefix.
Trait Implementations
Auto Trait Implementations
impl<S> !RefUnwindSafe for Router<S>
impl<S> Send for Router<S>
impl<S> Sync for Router<S>
impl<S> Unpin for Router<S>
impl<S> !UnwindSafe for Router<S>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,