Code Explainers
Code explainers tagged #shared-state
rust
use std::sync::Arc; use axum::{ extract::State,
Offloading work with a channel in Axum
background-jobs
message-passing
shared-state
Intermediate
9 steps
rust
use axum::{ extract::{Path, State}, http::StatusCode, routing::get,
Building a JSON user API in Axum
routing
shared-state
json-serialization
Intermediate
8 steps
rust
use axum::{ body::Bytes, extract::State, http::StatusCode,
Handling raw byte uploads in Axum
extractors
shared-state
request-limits
Intermediate
7 steps
rust
use std::collections::HashMap; use std::sync::{Arc, Mutex}; use std::thread;
Aggregating metrics across threads in Rust
concurrency
shared-state
mutex
Intermediate
7 steps
rust
use axum::{ response::sse::{Event, KeepAlive, Sse}, routing::get, Router,
Streaming live price ticks with SSE in Axum
server-sent-events
broadcast-channel
streaming
Advanced
8 steps
rust
use std::net::SocketAddr; use std::time::Duration; use axum::{routing::get, Json, Router};
Per-IP rate limiting in Axum with tower-governor
rate-limiting
middleware
tower
Intermediate
7 steps
rust
use axum::{ extract::{Path, State}, routing::{get, post}, Json, Router,
Building a nested REST API router in Axum
routing
extractors
shared-state
Intermediate
8 steps
rust
use axum::{ extract::State, http::StatusCode, response::IntoResponse,
An async job queue handler in Axum
background-jobs
async
http-202
Intermediate
9 steps