interface_rs/interface/
mapping.rs

1/// Represents a `mapping` stanza in the `/etc/network/interfaces` file.
2///
3/// The `Mapping` struct holds the script and map entries associated with a
4/// mapping configuration.
5///
6/// # Examples
7///
8/// Creating a new `Mapping`:
9///
10/// ```rust
11/// use interface_rs::interface::Mapping;
12///
13/// let mapping = Mapping {
14///     script: "/usr/local/bin/map-scripts".to_string(),
15///     maps: vec!["eth0".to_string(), "eth1".to_string()],
16/// };
17/// ```
18#[derive(Debug, Clone)]
19pub struct Mapping {
20    /// The script to be used for mapping.
21    pub script: String,
22    /// A list of map entries.
23    pub maps: Vec<String>,
24}