axum/axum-macros/tests/debug_handler/fail/extract_self_mut.rs
David Pedersen e7f1c88cd4
Always store state in an Arc (#1270)
* Add extension and state benchmarks

* wip

* Arc the state everywhere

* don't require `S: Clone`

* fix example
2022-08-17 20:08:24 +00:00

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() {}