MENU

Fun & Interesting

Decrusting the axum crate

Jon Gjengset 82,012 2 years ago
Video Not Working? Fix It Now

In this stream, we peel back the crust on the axum crate — https://github.com/tokio-rs/axum/ — and explore its interface, structure, and mechanisms. We talk about tower::Service, the Handler trait, Routers, and the State extractor. We also get into the way axum ensures at compile time that all handlers have access to the state that they'll need at runtime. For more details about axum, see https://docs.rs/axum/latest/axum/. 0:00:00 Introduction 0:01:15 axum 0:24:48 tower::Service 0:36:58 The Handler trait and its impls 1:15:20 The State extractor 1:44:40 axum's use of other crates 1:48:02 Unstable features axum wants 1:49:49 State requiring that T: CLone 2:04:32 FromRef 2:07:31 Handling custom HTTP methods 2:10:06 axum_extra Live version with chat (part 1): https://youtube.com/live/ntqGaoEFYiQ?feature=share Live version with chat (part 2): https://youtube.com/live/36m4dxJ0AHg?feature=share

Comment