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