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