More derives for types.

Addee new_safe constructor for Interval type
This commit is contained in:
Martin Berg Alstad
2024-08-25 00:55:14 +02:00
parent 17c81f4da1
commit 762330189d
3 changed files with 60 additions and 5 deletions

View File

@ -3,12 +3,14 @@ use derive_more::{Constructor, From};
use into_response_derive::IntoResponse;
use serde::Serialize;
#[derive(Debug, Clone, Serialize, From, Constructor)]
#[derive(Debug, Clone, PartialEq, Default, Serialize, From, Constructor)]
pub struct Array<T: Serialize> {
pub data: Vec<T>,
}
#[derive(Debug, Clone, Copy, Serialize, IntoResponse, From, Constructor)]
#[derive(
Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, IntoResponse, From, Constructor,
)]
pub struct Count {
pub count: usize,
}