Code Explainers
Code explainers tagged #extractors
rust
use axum::{ extract::{FromRef, FromRequestParts}, http::{request::Parts, StatusCode}, response::{IntoResponse, Response},
A custom API-key extractor in Axum
authentication
extractors
trait-implementation
Advanced
8 steps
rust
use axum::{ async_trait, extract::{FromRequestParts, State}, http::{header, request::Parts, StatusCode},
Custom auth extractors in Axum
extractors
authentication
error-handling
Intermediate
9 steps
rust
use axum::{extract::{Path, State}, http::StatusCode, Json}; use serde::Serialize; use std::sync::Arc;
Concurrent dashboard aggregation in Axum
concurrency
error-handling
graceful-degradation
Intermediate
7 steps
rust
use axum::{ extract::{Path, State}, http::{header, HeaderMap, StatusCode}, response::{IntoResponse, Response},
Optimistic concurrency with ETags in Axum
optimistic-concurrency
etag
http-headers
Intermediate
8 steps
rust
use axum::{ async_trait, extract::{rejection::JsonRejection, FromRequest, Request}, http::StatusCode,
A validating JSON extractor in Axum
extractors
validation
error-handling
Intermediate
7 steps
rust
use std::sync::Arc; use axum::{ body::Body, extract::{Extension, State},
Passing per-request context through Axum middleware
middleware
request-context
dependency-injection
Intermediate
8 steps
rust
use axum::{ extract::{Path, State}, http::StatusCode, response::{IntoResponse, Response},
Typed error handling in an Axum handler
error-handling
extractors
validation
Intermediate
9 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 axum::{extract::State, http::StatusCode, response::IntoResponse, Json}; use serde::{Deserialize, Serialize}; use uuid::Uuid;
Building a typed create_user handler in Axum
serde
extractors
sqlx
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::FromRequestParts, http::{request::Parts, StatusCode, header::AUTHORIZATION}, };
How a JWT extractor works in Axum
authentication
jwt
extractors
Intermediate
8 steps