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 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 with_generate_flags(self, flags: GenerateFlags) -> Self
pub fn with_generate_flags(self, flags: GenerateFlags) -> Self
Add code generator flags to the config.
Sourcepub fn without_generate_flags(self, flags: GenerateFlags) -> Self
pub fn without_generate_flags(self, flags: GenerateFlags) -> Self
Remove code generator flags to the 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_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, T>(self, types: I) -> Self
pub fn with_generate<I, T>(self, types: I) -> Self
Set the types the code should be generated for.
Sourcepub fn with_content_mode(self, mode: ContentMode) -> Self
pub fn with_content_mode(self, mode: ContentMode) -> Self
Set the content mode for the generator.
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl !RefUnwindSafe for Config
impl !Send for Config
impl !Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more