pub struct Reagent {
pub package: Option<String>,
pub description: Option<String>,
pub url: Option<String>,
pub version: Option<String>,
pub license: Option<String>,
pub name: Option<String>,
pub email: Option<String>,
pub debian: bool,
pub redox: bool,
}
Expand description
Configuration for reagent
, stored in reagent.toml
Fields§
§package: Option<String>
The name of the package: "reagent"
description: Option<String>
The description of the package: "Redox OS Standard Tests"
url: Option<String>
The repository or homepage of the package: "https://gitlab.redox-os.org/redox-os/reagent"
version: Option<String>
The current version of the package: "0.1.0"
license: Option<String>
The license used by the package: "MIT"
name: Option<String>
The name of the package maintainer: "Jeremy Soller"
email: Option<String>
The email of the package maintainer: "jackpot51@gmail.com"
debian: bool
Debian packaging
redox: bool
CI for Redox OS
Implementations§
Source§impl Reagent
impl Reagent
Sourcepub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self>
Create a reagent instance from a toml file
Sourcepub fn split(string: &str) -> (&str, &str, &str)
pub fn split(string: &str) -> (&str, &str, &str)
Split a string based on reagent tags, returning the following:
- Lines up to the
tag - Lines in between and including the tags
- Lines after the tag If there are no reagent tags, the entire file is assumed to be in between tags
Sourcepub fn generate(
&self,
input: &str,
original_opt: Option<&str>,
) -> Result<String, Error>
pub fn generate( &self, input: &str, original_opt: Option<&str>, ) -> Result<String, Error>
Generate updated file based on input template
If the file is empty, use the entire input file to generate it
If the file is not empty, only generate the sections inside of reagent tags
This starts from the line after a
Trait Implementations§
Source§impl Content for Reagent
impl Content for Reagent
Source§fn capacity_hint(&self, tpl: &Template<'_>) -> usize
fn capacity_hint(&self, tpl: &Template<'_>) -> usize
Content
for a given Template
.