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 serialize_empty_collections(
&mut self,
serialize_empty_collections: bool,
) -> &mut Config
pub fn serialize_empty_collections( &mut self, serialize_empty_collections: bool, ) -> &mut Config
Controls serialization of empty collection fields in objects.
Some Conjure implementations don’t properly handle deserialization of objects when empty collections are omitted. Enabling this option will cause empty optional, set, list, and map fields to be included in the serialized output.
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 Config
👎Deprecated since 1.2.0: no longer used
pub fn rustfmt<T>(&mut self, _rustfmt: T) -> &mut Config
No longer used.
Sourcepub fn strip_prefix<T>(&mut self, strip_prefix: T) -> &mut Config
pub fn strip_prefix<T>(&mut self, strip_prefix: T) -> &mut Config
Sets a prefix that will be stripped from package names.
Defaults to None
.
Sourcepub fn version<T>(&mut self, version: T) -> &mut Config
pub fn version<T>(&mut self, version: T) -> &mut Config
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.
Sourcepub fn extra_manifest_config<T>(&mut self, config: T) -> &mut Config
pub fn extra_manifest_config<T>(&mut self, config: T) -> &mut Config
Sets extra manifest configuration to be merged into the generated Cargo.toml.
Defaults to None