1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use serde::{Deserialize, Serialize};

use crate::ActionOut;

/*

*** Action Outs Scheme ***
[ActionOut, ActionOut, ...]

*/

#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub struct ActionOuts(Vec<ActionOut>);

impl ActionOuts {
	#[must_use]
	pub const fn get_action_outs(&self) -> &Vec<ActionOut> {
		&self.0
	}

	#[must_use]
	pub fn is_empty(&self) -> bool {
		self.0.is_empty()
	}
}

impl IntoIterator for ActionOuts {
	type IntoIter = std::vec::IntoIter<Self::Item>;
	type Item = ActionOut;

	fn into_iter(self) -> Self::IntoIter {
		self.0.into_iter()
	}
}