#[non_exhaustive]pub enum ProjectionConfig {
#[non_exhaustive] Python {
naming_policy: PythonNamingPolicy,
},
#[non_exhaustive] TypeScript {
naming_policy: TypeScriptNamingPolicy,
},
#[non_exhaustive] Rust {
naming_policy: RustNamingPolicy,
create_policy: RustCreatePolicy,
},
#[non_exhaustive] C {
naming_policy: CNamingPolicy,
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.
#[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.
#[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.
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.
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 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