Struct progenitor_impl::GenerationSettings
source · pub struct GenerationSettings { /* private fields */ }Expand description
Settings for Generator.
Implementations§
source§impl GenerationSettings
impl GenerationSettings
sourcepub fn with_interface(&mut self, interface: InterfaceStyle) -> &mut Self
pub fn with_interface(&mut self, interface: InterfaceStyle) -> &mut Self
Set the InterfaceStyle.
sourcepub fn with_inner_type(&mut self, inner_type: TokenStream) -> &mut Self
pub fn with_inner_type(&mut self, inner_type: TokenStream) -> &mut Self
Client inner type available to pre and post hooks.
sourcepub fn with_pre_hook(&mut self, pre_hook: TokenStream) -> &mut Self
pub fn with_pre_hook(&mut self, pre_hook: TokenStream) -> &mut Self
Hook invoked before issuing the HTTP request.
sourcepub fn with_pre_hook_async(&mut self, pre_hook: TokenStream) -> &mut Self
pub fn with_pre_hook_async(&mut self, pre_hook: TokenStream) -> &mut Self
Hook invoked before issuing the HTTP request.
sourcepub fn with_post_hook(&mut self, post_hook: TokenStream) -> &mut Self
pub fn with_post_hook(&mut self, post_hook: TokenStream) -> &mut Self
Hook invoked prior to receiving the HTTP response.
sourcepub fn with_derive(&mut self, derive: impl ToString) -> &mut Self
pub fn with_derive(&mut self, derive: impl ToString) -> &mut Self
Additional derive macros applied to generated types.
sourcepub fn with_patch<S: AsRef<str>>(
&mut self,
type_name: S,
patch: &TypePatch
) -> &mut Self
pub fn with_patch<S: AsRef<str>>( &mut self, type_name: S, patch: &TypePatch ) -> &mut Self
Modify a type with the given name. See typify::TypeSpaceSettings::with_patch.
sourcepub fn with_replacement<TS: ToString, RS: ToString, I: Iterator<Item = TypeImpl>>(
&mut self,
type_name: TS,
replace_name: RS,
impls: I
) -> &mut Self
pub fn with_replacement<TS: ToString, RS: ToString, I: Iterator<Item = TypeImpl>>( &mut self, type_name: TS, replace_name: RS, impls: I ) -> &mut Self
Replace a referenced type with a named type. See typify::TypeSpaceSettings::with_replacement.
sourcepub fn with_conversion<S: ToString, I: Iterator<Item = TypeImpl>>(
&mut self,
schema: SchemaObject,
type_name: S,
impls: I
) -> &mut Self
pub fn with_conversion<S: ToString, I: Iterator<Item = TypeImpl>>( &mut self, schema: SchemaObject, type_name: S, impls: I ) -> &mut Self
Replace a given schema with a named type. See typify::TypeSpaceSettings::with_conversion.
sourcepub fn with_unknown_crates(&mut self, policy: UnknownPolicy) -> &mut Self
pub fn with_unknown_crates(&mut self, policy: UnknownPolicy) -> &mut Self
Policy regarding crates referenced by the schema extension
x-rust-type not explicitly specified via Self::with_crate.
See typify::TypeSpaceSettings::with_unknown_crates.
sourcepub fn with_crate<S1: ToString>(
&mut self,
crate_name: S1,
version: CrateVers,
rename: Option<&String>
) -> &mut Self
pub fn with_crate<S1: ToString>( &mut self, crate_name: S1, version: CrateVers, rename: Option<&String> ) -> &mut Self
Explicitly named crates whose types may be used during generation rather than generating new types based on their schemas (base on the presence of the x-rust-type extension). See typify::TypeSpaceSettings::with_crate.
Trait Implementations§
source§impl Clone for GenerationSettings
impl Clone for GenerationSettings
source§fn clone(&self) -> GenerationSettings
fn clone(&self) -> GenerationSettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more