pub struct RoutesBuilder {
pub routes: Vec<Arc<Route>>,
pub fallback: Option<HandlerDynArc>,
}
Fields§
§routes: Vec<Arc<Route>>
§fallback: Option<HandlerDynArc>
Implementations§
Source§impl RoutesBuilder
impl RoutesBuilder
pub fn new() -> Self
pub fn build(self) -> ServerResult<Routes>
pub fn with_route<'a, P, H, F, RB>(self, _paths: P, _handler: H) -> Self
pub fn with_route_fn_sync<'a, P, I, C, RB>(self, _paths: P, _handler: I) -> Self
pub fn with_route_fn_async<'a, P, I, C, F, RB>( self, _paths: P, _handler: I, ) -> Self
pub fn with_route_fn_response<'a, P, C, RB>( self, _paths: P, _handler: C, ) -> Self
pub fn with_route_dyn<'a, P, H>(self, _paths: P, _handler: H) -> Self
pub fn with_route_arc<'a, P, I>(self, _paths: P, _handler: I) -> Self
pub fn with_route_object(self, _route: Route) -> Self
Auto Trait Implementations§
impl Freeze for RoutesBuilder
impl !RefUnwindSafe for RoutesBuilder
impl Send for RoutesBuilder
impl Sync for RoutesBuilder
impl Unpin for RoutesBuilder
impl !UnwindSafe for RoutesBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more