mirror of
https://github.com/tokio-rs/axum.git
synced 2024-12-16 03:42:08 +01:00
e7f1c88cd4
* Add extension and state benchmarks * wip * Arc the state everywhere * don't require `S: Clone` * fix example
27 lines
437 B
Rust
27 lines
437 B
Rust
use axum::{
|
|
async_trait,
|
|
extract::{FromRequest, RequestParts},
|
|
};
|
|
use axum_macros::debug_handler;
|
|
|
|
struct A;
|
|
|
|
#[async_trait]
|
|
impl<S, B> FromRequest<S, B> for A
|
|
where
|
|
B: Send,
|
|
S: Send + Sync,
|
|
{
|
|
type Rejection = ();
|
|
|
|
async fn from_request(_req: &mut RequestParts<S, B>) -> Result<Self, Self::Rejection> {
|
|
unimplemented!()
|
|
}
|
|
}
|
|
|
|
impl A {
|
|
#[debug_handler]
|
|
async fn handler(self) {}
|
|
}
|
|
|
|
fn main() {}
|