twilight_model/gateway/payload/incoming/
interaction_create.rs

1use crate::application::interaction::Interaction;
2use serde::{Deserialize, Serialize};
3use std::ops::{Deref, DerefMut};
4
5#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
6pub struct InteractionCreate(pub Interaction);
7
8impl Deref for InteractionCreate {
9    type Target = Interaction;
10
11    fn deref(&self) -> &Self::Target {
12        &self.0
13    }
14}
15
16impl DerefMut for InteractionCreate {
17    fn deref_mut(&mut self) -> &mut Self::Target {
18        &mut self.0
19    }
20}