diff options
author | gennyble <gen@nyble.dev> | 2024-04-14 03:37:34 -0500 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2024-04-14 03:37:34 -0500 |
commit | 71a9330b728c1b7d7688d3aac2c6b4e8adffb1b0 (patch) | |
tree | 7f9cdb8460c98b76fc40c8e8e467ee7c7a3b5a35 | |
parent | 826b4f122c175d487a426d97c96bd73f65bc5ea7 (diff) | |
download | awake-71a9330b728c1b7d7688d3aac2c6b4e8adffb1b0.tar.gz awake-71a9330b728c1b7d7688d3aac2c6b4e8adffb1b0.zip |
Add derives to util extractors
-rw-r--r-- | src/util.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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] |