Displays state
(count: web::Data<AtomicUsize>)
| 41 | |
| 42 | /// Displays state |
| 43 | async fn get_count(count: web::Data<AtomicUsize>) -> impl Responder { |
| 44 | let current_count = count.load(Ordering::SeqCst); |
| 45 | format!("Visitors: {current_count}") |
| 46 | } |
| 47 | |
| 48 | // the actor-based WebSocket examples REQUIRE `actix_web::main` for actor support |
| 49 | #[actix_web::main] |
nothing calls this directly
no outgoing calls
no test coverage detected