Rest/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
26 /// generating the entry paths and cloning the omit patterns, parallel
27 /// flag, pattern, and separator from the options.
28 ///
29 /// # Argument
30 ///
31 /// * `Option` - A reference to an Option struct containing initialization
32 /// parameters.
33 ///
34 /// # Returns
35 ///
36 /// Returns a new instance of Struct.
37 pub fn Fn(Option:&Option) -> Self {
38 Self {
39 Entry:crate::Fn::Binary::Command::Entry::Fn(Option),
40
41 Parallel:Option.Parallel,
42
43 Pattern:Option.Pattern.clone(),
44
45 Separator:Option.Separator,
46 }
47 }
48}
49
50use crate::Struct::Binary::Command::Option::{Parallel, Pattern, Separator, Struct as Option};
51
52/// Type alias for a vector of vectors, where each inner vector contains the
53/// components of a file path.
54pub type Type = Vec<Vec<String>>;