mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 05:52:19 +00:00
small refactoring
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
use axum::body::Body;
|
use axum::{extract::Request, response::Response};
|
||||||
use futures_util::future::BoxFuture;
|
use futures_util::future::BoxFuture;
|
||||||
use headers::Allow;
|
use headers::Allow;
|
||||||
use http::{Method, Request, Response};
|
use http::Method;
|
||||||
use std::{convert::Infallible, str::FromStr};
|
use std::{convert::Infallible, str::FromStr};
|
||||||
|
|
||||||
pub type MethodFunction<Service> =
|
pub type MethodFunction<State> =
|
||||||
fn(Service, Request<Body>) -> BoxFuture<'static, Result<Response<Body>, Infallible>>;
|
fn(State, Request) -> BoxFuture<'static, Result<Response, Infallible>>;
|
||||||
|
|
||||||
pub trait AxumMethods: Sized + Send + Sync + 'static {
|
pub trait AxumMethods: Sized + Send + Sync + 'static {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|||||||
Reference in New Issue
Block a user