[][src]Struct conjure_codegen::Config

pub struct Config { /* fields omitted */ }

Codegen configuration.

Methods

impl Config
[src]

pub fn new() -> Config
[src]

Creates a new Config with default settings.

pub fn exhaustive(&mut self, exhaustive: bool) -> &mut Config
[src]

Controls exhaustive matchability of unions and enums.

Non-exhaustive unions and enums have the ability to deserialize and reserialize unknown variants. This enables clients to be more forward-compatible with changes made by newer servers.

Defaults to false.

pub fn run_rustfmt(&mut self, run_rustfmt: bool) -> &mut Config
[src]

Controls the use of rustfmt to format generated source code.

Defaults to true.

pub fn rustfmt<T>(&mut self, rustfmt: T) -> &mut Config where
    T: AsRef<OsStr>, 
[src]

Sets the name of the binary used to format source code.

Defaults to the value of the RUSTFMT environment variable, or rustfmt if not set.

pub fn generate_files<P, Q>(&self, ir_file: P, out_dir: Q) -> Result<(), Error> where
    P: AsRef<Path>,
    Q: AsRef<Path>, 
[src]

Generates Rust source files from a JSON-encoded Conjure IR file.

Trait Implementations

impl Default for Config
[src]

Auto Trait Implementations

impl Send for Config

impl Sync for Config

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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