Struct serde_generate::CodeGeneratorConfig
source · [−]pub struct CodeGeneratorConfig { /* private fields */ }Expand description
Code generation options meant to be supported by all languages.
Implementations
sourceimpl 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) -> Self where
I: IntoIterator<Item = Encoding>,
pub fn with_encodings<I>(self, encodings: I) -> Self where
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
sourceimpl Clone for CodeGeneratorConfig
impl Clone for CodeGeneratorConfig
sourcefn clone(&self) -> CodeGeneratorConfig
fn clone(&self) -> CodeGeneratorConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for CodeGeneratorConfig
impl Send for CodeGeneratorConfig
impl Sync for CodeGeneratorConfig
impl Unpin for CodeGeneratorConfig
impl UnwindSafe for CodeGeneratorConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more