Skip to main content

artifacts/models/
raid_response_schema.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5#[cfg_attr(feature = "specta", derive(specta::Type))]
6pub struct RaidResponseSchema {
7    /// Raid details.
8    #[serde(rename = "data")]
9    pub data: Box<models::RaidSchema>,
10}
11
12impl RaidResponseSchema {
13    pub fn new(data: models::RaidSchema) -> RaidResponseSchema {
14        RaidResponseSchema {
15            data: Box::new(data),
16        }
17    }
18}
19
20impl crate::traits::IntoData for RaidResponseSchema {
21    type Data = Box<models::RaidSchema>;
22    fn into_data(self) -> Self::Data {
23        self.data
24    }
25}