Library/Struct/Binary/Command/
Entry.rs

1/// Represents the structure for binary command entries.
2///
3/// This struct holds various fields related to the command entries, including the entry paths,
4/// parallel execution flag, pattern to match, separator for file paths, and omit patterns.
5pub struct Struct {
6	/// A vector of vectors, where each inner vector contains the components of a file path.
7	pub Entry: Type,
8
9	/// A flag indicating whether to execute commands in parallel.
10	pub Parallel: Parallel,
11
12	/// A string pattern to match against the last element of each entry.
13	pub Pattern: Pattern,
14
15	/// The separator used for file paths.
16	pub Separator: Separator,
17
18	/// A vector of strings representing patterns to omit.
19	pub Omit: Omit,
20}
21
22impl Struct {
23	/// Creates a new instance of the Struct.
24	///
25	/// This function initializes the Struct with the provided options, generating the entry paths
26	/// and cloning the omit patterns, parallel flag, pattern, and separator from the options.
27	///
28	/// # Arguments
29	///
30	/// * `Option` - A reference to an Option struct containing initialization parameters.
31	///
32	/// # Returns
33	///
34	/// Returns a new instance of Struct.
35	pub fn Fn(Option: &Option) -> Self {
36		Self {
37			Entry: crate::Fn::Binary::Command::Entry::Fn(Option),
38			Omit: Option.Omit.clone(),
39			Parallel: Option.Parallel,
40			Pattern: Option.Pattern.clone(),
41			Separator: Option.Separator,
42		}
43	}
44}
45
46use crate::Struct::Binary::Command::Option::{
47	Omit, Parallel, Pattern, Separator, Struct as Option,
48};
49
50/// Type alias for a vector of vectors, where each inner vector contains the components of a file path.
51pub type Type = Vec<Vec<String>>;