From 71a9330b728c1b7d7688d3aac2c6b4e8adffb1b0 Mon Sep 17 00:00:00 2001 From: gennyble Date: Sun, 14 Apr 2024 03:37:34 -0500 Subject: Add derives to util extractors --- src/util.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util.rs b/src/util.rs index 11431e5..a3cc064 100644 --- a/src/util.rs +++ b/src/util.rs @@ -10,6 +10,7 @@ use axum::{ use sha2::{Digest, Sha256}; use time::{format_description::FormatItem, macros::format_description, OffsetDateTime}; +#[derive(Debug, Clone)] pub struct RemoteIp(String); #[async_trait] @@ -44,6 +45,7 @@ impl Deref for RemoteIp { const FMT: &[FormatItem<'_>] = format_description!("[year]-[month]-[day]"); +#[derive(Debug, Copy, Clone)] pub struct SessionId([u8; 4]); #[async_trait] @@ -89,6 +91,7 @@ impl fmt::Display for SessionId { } } +#[derive(Debug, Clone)] pub struct Referer(String); #[async_trait] -- cgit 1.4.1-3-g733a5