Crate Actix Web
Chester Wyke December 15, 2023 Updated: April 15, 2025 #rust
rust (Series)
Conditional Compilation
Install
Crate Serde
References
Cargo
Toolchain (Nightly)
String Formatting
Time
Crate Tokio
Publish Crate
rustfmt
Single file script
Snippets
CI
Pattern Type State
WASM
Create New Crate
Documentation
JSON
Pattern Builder
Testing
Working with collections of bytes
Thoughts about rust
Are we yet
OnceLock
Crate Actix Web
Stack Overflow
Crate Clap
Crate Poll Promise
Crate Insta
Tips
Create new egui project
Crate CSV
Crate egui
Iterators
Crate Tracing Subscriber
Regex
vscode
Enum Conversion
Macros
lettre
Google APIs
Conditional Compilation
Install
Crate Serde
References
Cargo
Toolchain (Nightly)
String Formatting
Time
Crate Tokio
Publish Crate
rustfmt
Single file script
Snippets
CI
Pattern Type State
WASM
Create New Crate
Documentation
JSON
Pattern Builder
Testing
Working with collections of bytes
Thoughts about rust
Are we yet
OnceLock
Crate Actix Web
Stack Overflow
Crate Clap
Crate Poll Promise
Crate Insta
Tips
Create new egui project
Crate CSV
Crate egui
Iterators
Crate Tracing Subscriber
Regex
vscode
Enum Conversion
Macros
lettre
Google APIs
Website: https://actix.rs/
List of useful doc items
Log (record) unmatched routes
Add a default service and route (This example uses tracing to do the recording)
default_service; // Added into config
pub async
Graceful shutdown
There are multiple references I found and the appropriate one depends on your use case. I’m collecting them here because I don’t want to have to search for them again. I recommend also checking out Tokio Cancellation Tokens as well as applicable to your use case.
Resources:
- Official example of shutdown - It shows how to shutdown from an endpoint
- Example Response to issue - Shows how to shutdown if there is another task running in parallel to actix_web. Both tasks get shutdown gracefully. To shutdown the second task I’d recommend using Tokio Cancellation Tokens instead.
- Official Documentation website - Explains the default behaviour