1 2 3 4 5 6 7 8 9 10 11
use std::ops::Deref; #[derive(sqlx::FromRow, Debug)] #[sqlx(transparent)] pub struct ID(pub u64); /// Enable `Deref` coercion `ID`. impl Deref for ID { type Target = u64; fn deref(&self) -> &Self::Target { &self.0 } }