#[non_exhaustive]pub enum ProjectionConfig {
#[non_exhaustive] Python {
naming_policy: PythonNamingPolicy,
type_name_overrides: Vec<TypeNameOverride>,
},
#[non_exhaustive] TypeScript {
naming_policy: TypeScriptNamingPolicy,
type_name_overrides: Vec<TypeNameOverride>,
},
#[non_exhaustive] Rust {
naming_policy: RustNamingPolicy,
type_name_overrides: Vec<TypeNameOverride>,
create_policy: RustCreatePolicy,
},
#[non_exhaustive] C {
naming_policy: CNamingPolicy,
type_name_overrides: Vec<TypeNameOverride>,
symbol_prefix: CSymbolPrefix,
},
}Expand description
Target-specific options that are consumed by a shipped emitter.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]Python
Python projection options.
Fields
This variant is marked as non-exhaustive
naming_policy: PythonNamingPolicyVersioned Python naming behavior used for every generated symbol.
type_name_overrides: Vec<TypeNameOverride>Explicit model names, sorted by canonical type identity.
#[non_exhaustive]TypeScript
TypeScript projection options.
Fields
This variant is marked as non-exhaustive
naming_policy: TypeScriptNamingPolicyVersioned TypeScript naming behavior used for every generated symbol.
type_name_overrides: Vec<TypeNameOverride>Explicit model names, sorted by canonical type identity.
#[non_exhaustive]Rust
Native Rust projection options.
Fields
This variant is marked as non-exhaustive
naming_policy: RustNamingPolicyVersioned Rust naming behavior used for every generated symbol.
type_name_overrides: Vec<TypeNameOverride>Explicit model names, sorted by canonical type identity.
create_policy: RustCreatePolicyVersioned checked construction surface generated for constructible models.
#[non_exhaustive]C
C projection options.
Fields
This variant is marked as non-exhaustive
naming_policy: CNamingPolicyVersioned C naming behavior used for every generated symbol.
type_name_overrides: Vec<TypeNameOverride>Explicit model names, sorted by canonical type identity.
symbol_prefix: CSymbolPrefixApplication-specific prefix for C’s global link namespace.
Implementations§
Source§impl ProjectionConfig
impl ProjectionConfig
Sourcepub const fn typescript() -> Self
pub const fn typescript() -> Self
Construct the initial TypeScript projection configuration.
Sourcepub fn c(symbol_prefix: CSymbolPrefix) -> Self
pub fn c(symbol_prefix: CSymbolPrefix) -> Self
Construct the initial C projection configuration.
Sourcepub fn with_type_name_override(
self,
type_id: TypeId,
name: impl Into<String>,
) -> Result<Self, Diagnostic>
pub fn with_type_name_override( self, type_id: TypeId, name: impl Into<String>, ) -> Result<Self, Diagnostic>
Add an exact model type-name override without changing database names.
Duplicate identities are rejected. Projection validates schema membership and collisions with other model names and generated helper names.
Sourcepub fn validate_type_name_overrides(&self) -> Result<(), Diagnostic>
pub fn validate_type_name_overrides(&self) -> Result<(), Diagnostic>
Validate overrides after configuration assembly or external mutation.
Sourcepub fn type_name_overrides(&self) -> &[TypeNameOverride]
pub fn type_name_overrides(&self) -> &[TypeNameOverride]
Return explicit model names in canonical identity order.
Sourcepub const fn target(&self) -> BindingTarget
pub const fn target(&self) -> BindingTarget
Return the binding target that consumes this configuration.
Sourcepub const fn python_naming_policy(&self) -> Option<PythonNamingPolicy>
pub const fn python_naming_policy(&self) -> Option<PythonNamingPolicy>
Return the Python naming policy when this is a Python config.
Sourcepub const fn typescript_naming_policy(&self) -> Option<TypeScriptNamingPolicy>
pub const fn typescript_naming_policy(&self) -> Option<TypeScriptNamingPolicy>
Return the TypeScript naming policy when this is a TypeScript config.
Sourcepub const fn rust_naming_policy(&self) -> Option<RustNamingPolicy>
pub const fn rust_naming_policy(&self) -> Option<RustNamingPolicy>
Return the Rust naming policy when this is a Rust config.
Sourcepub const fn rust_create_policy(&self) -> Option<RustCreatePolicy>
pub const fn rust_create_policy(&self) -> Option<RustCreatePolicy>
Return the checked Rust create policy when this is a Rust config.
Sourcepub const fn c_naming_policy(&self) -> Option<CNamingPolicy>
pub const fn c_naming_policy(&self) -> Option<CNamingPolicy>
Return the C naming policy when this is a C config.
Sourcepub const fn c_symbol_prefix(&self) -> Option<&CSymbolPrefix>
pub const fn c_symbol_prefix(&self) -> Option<&CSymbolPrefix>
Return the symbol prefix when this is a C config.
Trait Implementations§
Source§impl Clone for ProjectionConfig
impl Clone for ProjectionConfig
Source§fn clone(&self) -> ProjectionConfig
fn clone(&self) -> ProjectionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more