Struct serde_generate::CodeGeneratorConfig
source · pub struct CodeGeneratorConfig { /* private fields */ }
Expand description
Code generation options meant to be supported by all languages.
Implementations§
source§impl CodeGeneratorConfig
impl CodeGeneratorConfig
pub fn module_name(&self) -> &str
sourcepub fn with_serialization(self, serialization: bool) -> Self
pub fn with_serialization(self, serialization: bool) -> Self
Whether to include serialization methods.
sourcepub fn with_encodings<I>(self, encodings: I) -> Selfwhere
I: IntoIterator<Item = Encoding>,
pub fn with_encodings<I>(self, encodings: I) -> Selfwhere
I: IntoIterator<Item = Encoding>,
Whether to include specialized methods for specific encodings.
sourcepub fn with_external_definitions(
self,
external_definitions: ExternalDefinitions,
) -> Self
pub fn with_external_definitions( self, external_definitions: ExternalDefinitions, ) -> Self
Container names provided by external modules.
sourcepub fn with_comments(self, comments: DocComments) -> Self
pub fn with_comments(self, comments: DocComments) -> Self
Comments attached to particular entity.
sourcepub fn with_custom_code(self, code: CustomCode) -> Self
pub fn with_custom_code(self, code: CustomCode) -> Self
Custom code attached to particular entity.
sourcepub fn with_c_style_enums(self, c_style_enums: bool) -> Self
pub fn with_c_style_enums(self, c_style_enums: bool) -> Self
Generate C-style enums (without variant data) as the target language native enum type in supported languages.
Trait Implementations§
source§impl Clone for CodeGeneratorConfig
impl Clone for CodeGeneratorConfig
source§fn clone(&self) -> CodeGeneratorConfig
fn clone(&self) -> CodeGeneratorConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CodeGeneratorConfig
impl RefUnwindSafe for CodeGeneratorConfig
impl Send for CodeGeneratorConfig
impl Sync for CodeGeneratorConfig
impl Unpin for CodeGeneratorConfig
impl UnwindSafe for CodeGeneratorConfig
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