pub struct Config {
pub parser: ParserConfig,
pub interpreter: InterpreterConfig,
pub optimizer: OptimizerConfig,
pub generator: GeneratorConfig,
}Expand description
Configuration structure for the generate method.
Fields§
§parser: ParserConfigConfiguration for the schema parser.
interpreter: InterpreterConfigConfiguration for the schema interpreter.
optimizer: OptimizerConfigConfiguration for the type information optimizer.
generator: GeneratorConfigConfiguration for the code generator.
Implementations§
Source§impl Config
impl Config
Sourcepub fn set_parser_flags(self, flags: ParserFlags) -> Self
pub fn set_parser_flags(self, flags: ParserFlags) -> Self
Set parser flags to the config.
Sourcepub fn with_parser_flags(self, flags: ParserFlags) -> Self
pub fn with_parser_flags(self, flags: ParserFlags) -> Self
Add parser flags to the config.
Sourcepub fn without_parser_flags(self, flags: ParserFlags) -> Self
pub fn without_parser_flags(self, flags: ParserFlags) -> Self
Remove parser flags to the config.
Sourcepub fn set_interpreter_flags(self, flags: InterpreterFlags) -> Self
pub fn set_interpreter_flags(self, flags: InterpreterFlags) -> Self
Set interpreter flags to the config.
Sourcepub fn with_interpreter_flags(self, flags: InterpreterFlags) -> Self
pub fn with_interpreter_flags(self, flags: InterpreterFlags) -> Self
Add code interpreter flags to the config.
Sourcepub fn without_interpreter_flags(self, flags: InterpreterFlags) -> Self
pub fn without_interpreter_flags(self, flags: InterpreterFlags) -> Self
Remove code interpreter flags to the config.
Sourcepub fn set_optimizer_flags(self, flags: OptimizerFlags) -> Self
pub fn set_optimizer_flags(self, flags: OptimizerFlags) -> Self
Set optimizer flags to the config.
Sourcepub fn with_optimizer_flags(self, flags: OptimizerFlags) -> Self
pub fn with_optimizer_flags(self, flags: OptimizerFlags) -> Self
Add optimizer flags to the config.
Sourcepub fn without_optimizer_flags(self, flags: OptimizerFlags) -> Self
pub fn without_optimizer_flags(self, flags: OptimizerFlags) -> Self
Remove optimizer flags to the config.
Sourcepub fn set_generator_flags(self, flags: GeneratorFlags) -> Self
pub fn set_generator_flags(self, flags: GeneratorFlags) -> Self
Set generator flags to the config.
Sourcepub fn with_generator_flags(self, flags: GeneratorFlags) -> Self
pub fn with_generator_flags(self, flags: GeneratorFlags) -> Self
Add code generator flags to the config.
Sourcepub fn without_generator_flags(self, flags: GeneratorFlags) -> Self
pub fn without_generator_flags(self, flags: GeneratorFlags) -> Self
Remove code generator flags to the config.
Sourcepub fn set_box_flags(self, flags: BoxFlags) -> Self
pub fn set_box_flags(self, flags: BoxFlags) -> Self
Set boxing flags to the code generator config.
Sourcepub fn with_box_flags(self, flags: BoxFlags) -> Self
pub fn with_box_flags(self, flags: BoxFlags) -> Self
Add boxing flags to the code generator config.
Sourcepub fn without_box_flags(self, flags: BoxFlags) -> Self
pub fn without_box_flags(self, flags: BoxFlags) -> Self
Remove boxing flags to the code generator config.
Sourcepub fn with_renderer(self, renderer: Renderer) -> Self
pub fn with_renderer(self, renderer: Renderer) -> Self
Adds the passed renderer to the config.
If the same type of renderer was already added, it is replaced by the new one.
Sourcepub fn with_renderers<I>(self, renderers: I) -> Selfwhere
I: IntoIterator<Item = Renderer>,
pub fn with_renderers<I>(self, renderers: I) -> Selfwhere
I: IntoIterator<Item = Renderer>,
Add multiple renderers to the generator config.
See with_renderer for details.
Sourcepub fn with_quick_xml_serialize(self) -> Self
pub fn with_quick_xml_serialize(self) -> Self
Enable code generation for quick_xml serialization.
Sourcepub fn with_quick_xml_deserialize(self) -> Self
pub fn with_quick_xml_deserialize(self) -> Self
Enable code generation for quick_xml deserialization.
Sourcepub fn with_quick_xml(self) -> Self
pub fn with_quick_xml(self) -> Self
Enable code generation for quick_xml serialization and deserialization.
Sourcepub fn with_serde_support(self, serde_support: SerdeSupport) -> Self
pub fn with_serde_support(self, serde_support: SerdeSupport) -> Self
Set the serde support.
Sourcepub fn with_generate<I>(self, types: I) -> Self
pub fn with_generate<I>(self, types: I) -> Self
Set the types the code should be generated for.
Sourcepub fn with_typedef_mode(self, mode: TypedefMode) -> Self
pub fn with_typedef_mode(self, mode: TypedefMode) -> Self
Set the typedef mode for the generator.
Sourcepub fn with_derive<I>(self, derive: I) -> Self
pub fn with_derive<I>(self, derive: I) -> Self
Set the traits the generated types should derive from.