[−][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 strip_prefix<T>(&mut self, strip_prefix: T) -> &mut Config where
T: Into<Option<String>>,
[src]
T: Into<Option<String>>,
Sets a prefix that will be stripped from package names.
Defaults to None
.
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,