MCPcopy Create free account
hub / github.com/actix/examples / stop

Function stop

shutdown-server/src/main.rs:11–14  ·  view source on GitHub ↗
(Path(graceful): Path<bool>, stop_handle: web::Data<StopHandle>)

Source from the content-addressed store, hash-verified

9
10#[post("/stop/{graceful}")]
11async fn stop(Path(graceful): Path<bool>, stop_handle: web::Data<StopHandle>) -> HttpResponse {
12 stop_handle.stop(graceful);
13 HttpResponse::NoContent().finish()
14}
15
16#[actix_web::main]
17async fn main() -> std::io::Result<()> {

Callers

nothing calls this directly

Calls 1

stopMethod · 0.80

Tested by

no test coverage detected