pub struct Builder<E> { /* private fields */ }
Expand description
Http route builder.
Implementations§
source§impl<E> Builder<E>
impl<E> Builder<E>
pub fn new() -> Self
pub fn with_middleware(self, md: impl Into<Middleware<E>>) -> Self
sourcepub fn with_path(self, path: &'static str) -> Self
pub fn with_path(self, path: &'static str) -> Self
Set http route url. Next call concatenate path to existed url.
sourcepub fn with_method(self, method: &'static str) -> Self
pub fn with_method(self, method: &'static str) -> Self
Set http method (GET/POST/PUT/ etc).
Trait Implementations§
Auto Trait Implementations§
impl<E> !RefUnwindSafe for Builder<E>
impl<E> !Send for Builder<E>
impl<E> !Sync for Builder<E>
impl<E> Unpin for Builder<E>
impl<E> !UnwindSafe for Builder<E>
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