[][src]Struct reagent::Reagent

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,
}

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

Methods

impl Reagent[src]

pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self>[src]

Create a reagent instance from a toml file

pub fn split(string: &str) -> (&str, &str, &str)[src]

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

pub fn generate(
    &self,
    input: &str,
    original_opt: Option<&str>
) -> Result<String, Error>
[src]

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 tag, and ends on the line before a tag

Trait Implementations

impl Debug for Reagent[src]

impl Content for Reagent[src]

fn is_truthy(&self) -> bool[src]

Marks whether this content is truthy. Used when attempting to render a section.

fn render_escaped<E>(
    &self,
    _encoder: &mut E
) -> Result<(), <E as Encoder>::Error> where
    E: Encoder
[src]

Renders self as a variable to the encoder. Read more

fn render_unescaped<E>(
    &self,
    encoder: &mut E
) -> Result<(), <E as Encoder>::Error> where
    E: Encoder
[src]

Renders self as a variable to the encoder. Read more

fn render_cmark<E>(&self, encoder: &mut E) -> Result<(), <E as Encoder>::Error> where
    E: Encoder
[src]

Renders self as a variable to the encoder with CommonMark processing. Read more

fn render_section<E>(
    &self,
    section: Section<'section>,
    encoder: &mut E
) -> Result<(), <E as Encoder>::Error> where
    E: Encoder
[src]

Render a section with self.

fn render_inverse<E>(
    &self,
    section: Section<'section>,
    encoder: &mut E
) -> Result<(), <E as Encoder>::Error> where
    E: Encoder
[src]

Render a section with self.

impl Serialize for Reagent[src]

impl<'de> Deserialize<'de> for Reagent[src]

Auto Trait Implementations

impl Send for Reagent

impl Sync for Reagent

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]