midgard_rs/types/
actions.rs1use serde::{Deserialize, Serialize};
2
3use crate::Action;
4
5#[derive(Debug, Serialize, Deserialize, Clone, Default)]
13pub struct Actions(Vec<Action>);
14
15impl Actions {
16 #[must_use]
17 pub const fn get_actions(&self) -> &Vec<Action> {
18 &self.0
19 }
20
21 #[must_use]
22 pub fn is_empty(&self) -> bool {
23 self.0.is_empty()
24 }
25}
26
27impl IntoIterator for Actions {
28 type IntoIter = std::vec::IntoIter<Self::Item>;
29 type Item = Action;
30
31 fn into_iter(self) -> Self::IntoIter {
32 self.0.into_iter()
33 }
34}