mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-23 07:39:25 +01:00
e7f1c88cd4
* Add extension and state benchmarks * wip * Arc the state everywhere * don't require `S: Clone` * fix example
27 lines
442 B
Rust
27 lines
442 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(&mut self) {}
|
|
}
|
|
|
|
fn main() {}
|