20 lines
374 B
Rust
20 lines
374 B
Rust
|
|
use std::time::Instant;
|
|
use uuid::Uuid;
|
|
|
|
use crate::app::AppState;
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub struct RequestContext {
|
|
pub request_id: Uuid,
|
|
pub started_at: Instant,
|
|
pub method: axum::http::Method,
|
|
pub uri: axum::http::Uri,
|
|
pub user: Option<CurrentUser>,
|
|
}
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub struct CurrentUser {
|
|
pub id: Uuid,
|
|
pub username: String,
|
|
} |