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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/// Represents the structure for binary command entries.
///
/// This struct holds various fields related to the command entries, including the entry paths,
/// parallel execution flag, pattern to match, separator for file paths, and omit patterns.
pub struct Struct {
	/// A vector of vectors, where each inner vector contains the components of a file path.
	pub Entry: Type,

	/// A flag indicating whether to execute commands in parallel.
	pub Parallel: Parallel,

	/// A string pattern to match against the last element of each entry.
	pub Pattern: Pattern,

	/// The separator used for file paths.
	pub Separator: Separator,

	/// A vector of strings representing patterns to omit.
	pub Omit: Omit,
}

impl Struct {
	/// Creates a new instance of the Struct.
	///
	/// This function initializes the Struct with the provided options, generating the entry paths
	/// and cloning the omit patterns, parallel flag, pattern, and separator from the options.
	///
	/// # Arguments
	///
	/// * `Option` - A reference to an Option struct containing initialization parameters.
	///
	/// # Returns
	///
	/// Returns a new instance of Struct.
	pub fn Fn(Option: &Option) -> Self {
		Self {
			Entry: crate::Fn::Binary::Command::Entry::Fn(Option),
			Omit: Option.Omit.clone(),
			Parallel: Option.Parallel,
			Pattern: Option.Pattern.clone(),
			Separator: Option.Separator,
		}
	}
}

use crate::Struct::Binary::Command::Option::{
	Omit, Parallel, Pattern, Separator, Struct as Option,
};

/// Type alias for a vector of vectors, where each inner vector contains the components of a file path.
pub type Type = Vec<Vec<String>>;