pub struct VersionedRouteBuilder<'a, S>{ /* private fields */ }
Expand description
Builder for adding routes to a specific version
Implementations§
Source§impl<'a, S> VersionedRouteBuilder<'a, S>
impl<'a, S> VersionedRouteBuilder<'a, S>
Sourcepub fn get<F, Fut, R>(self, path: &str, handler: F) -> Selfwhere
F: Fn(ElifRequest) -> Fut + Send + Clone + 'static,
Fut: Future<Output = HttpResult<R>> + Send + 'static,
R: IntoElifResponse + Send + 'static,
pub fn get<F, Fut, R>(self, path: &str, handler: F) -> Selfwhere
F: Fn(ElifRequest) -> Fut + Send + Clone + 'static,
Fut: Future<Output = HttpResult<R>> + Send + 'static,
R: IntoElifResponse + Send + 'static,
Add a GET route for this version
Sourcepub fn post<F, Fut, R>(self, path: &str, handler: F) -> Selfwhere
F: Fn(ElifRequest) -> Fut + Send + Clone + 'static,
Fut: Future<Output = HttpResult<R>> + Send + 'static,
R: IntoElifResponse + Send + 'static,
pub fn post<F, Fut, R>(self, path: &str, handler: F) -> Selfwhere
F: Fn(ElifRequest) -> Fut + Send + Clone + 'static,
Fut: Future<Output = HttpResult<R>> + Send + 'static,
R: IntoElifResponse + Send + 'static,
Add a POST route for this version
Sourcepub fn put<F, Fut, R>(self, path: &str, handler: F) -> Selfwhere
F: Fn(ElifRequest) -> Fut + Send + Clone + 'static,
Fut: Future<Output = HttpResult<R>> + Send + 'static,
R: IntoElifResponse + Send + 'static,
pub fn put<F, Fut, R>(self, path: &str, handler: F) -> Selfwhere
F: Fn(ElifRequest) -> Fut + Send + Clone + 'static,
Fut: Future<Output = HttpResult<R>> + Send + 'static,
R: IntoElifResponse + Send + 'static,
Add a PUT route for this version
Sourcepub fn delete<F, Fut, R>(self, path: &str, handler: F) -> Selfwhere
F: Fn(ElifRequest) -> Fut + Send + Clone + 'static,
Fut: Future<Output = HttpResult<R>> + Send + 'static,
R: IntoElifResponse + Send + 'static,
pub fn delete<F, Fut, R>(self, path: &str, handler: F) -> Selfwhere
F: Fn(ElifRequest) -> Fut + Send + Clone + 'static,
Fut: Future<Output = HttpResult<R>> + Send + 'static,
R: IntoElifResponse + Send + 'static,
Add a DELETE route for this version
Sourcepub fn patch<F, Fut, R>(self, path: &str, handler: F) -> Selfwhere
F: Fn(ElifRequest) -> Fut + Send + Clone + 'static,
Fut: Future<Output = HttpResult<R>> + Send + 'static,
R: IntoElifResponse + Send + 'static,
pub fn patch<F, Fut, R>(self, path: &str, handler: F) -> Selfwhere
F: Fn(ElifRequest) -> Fut + Send + Clone + 'static,
Fut: Future<Output = HttpResult<R>> + Send + 'static,
R: IntoElifResponse + Send + 'static,
Add a PATCH route for this version
Auto Trait Implementations§
impl<'a, S> Freeze for VersionedRouteBuilder<'a, S>
impl<'a, S> !RefUnwindSafe for VersionedRouteBuilder<'a, S>
impl<'a, S> Send for VersionedRouteBuilder<'a, S>
impl<'a, S> Sync for VersionedRouteBuilder<'a, S>
impl<'a, S> Unpin for VersionedRouteBuilder<'a, S>
impl<'a, S> !UnwindSafe for VersionedRouteBuilder<'a, S>
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