Struct conjure_codegen::Config
source · pub struct Config { /* private fields */ }Expand description
Codegen configuration.
Implementations§
source§impl Config
impl Config
sourcepub fn exhaustive(&mut self, exhaustive: bool) -> &mut Config
pub fn exhaustive(&mut self, exhaustive: bool) -> &mut Config
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.
sourcepub fn staged_builders(&mut self, staged_builders: bool) -> &mut Config
pub fn staged_builders(&mut self, staged_builders: bool) -> &mut Config
If enabled, generated objects will use “staged builders”.
Staged builders guarantee that all fields are set at compile time rather than panicing during construction.
Defaults to false.
sourcepub fn run_rustfmt(&mut self, _run_rustfmt: bool) -> &mut Config
👎Deprecated since 1.2.0: no longer used
pub fn run_rustfmt(&mut self, _run_rustfmt: bool) -> &mut Config
No longer used.
sourcepub fn rustfmt<T>(&mut self, _rustfmt: T) -> &mut Configwhere
T: AsRef<OsStr>,
👎Deprecated since 1.2.0: no longer used
pub fn rustfmt<T>(&mut self, _rustfmt: T) -> &mut Configwhere
T: AsRef<OsStr>,
No longer used.
sourcepub fn strip_prefix<T>(&mut self, strip_prefix: T) -> &mut Configwhere
T: Into<Option<String>>,
pub fn strip_prefix<T>(&mut self, strip_prefix: T) -> &mut Configwhere
T: Into<Option<String>>,
Sets a prefix that will be stripped from package names.
Defaults to None.
sourcepub fn version<T>(&mut self, version: T) -> &mut Configwhere
T: Into<Option<String>>,
pub fn version<T>(&mut self, version: T) -> &mut Configwhere
T: Into<Option<String>>,
Sets the version included in endpoint metadata for generated client bindings.
Defaults to the version passed to Self::build_crate, or None otherwise.
sourcepub fn build_crate(&mut self, name: &str, version: &str) -> &mut Config
pub fn build_crate(&mut self, name: &str, version: &str) -> &mut Config
Switches generation to create a full crate.
Defaults to just generating a single module.