[−][src]Struct conjure_codegen::Config
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]
T: AsRef<OsStr>,
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]
P: AsRef<Path>,
Q: AsRef<Path>,
Generates Rust source files from a JSON-encoded Conjure IR file.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,