pub struct Config {
cdylib_name: Option<String>,
module_name: Option<String>,
ffi_module_name: Option<String>,
ffi_module_filename: Option<String>,
generate_module_map: Option<bool>,
omit_argument_labels: Option<bool>,
generate_immutable_records: Option<bool>,
experimental_sendable_value_types: Option<bool>,
custom_types: HashMap<String, CustomTypeConfig>,
}
Expand description
Config options for the caller to customize the generated Swift.
Note that this can only be used to control details of the Swift that do not affect the underlying component,
since the details of the underlying component are entirely determined by the ComponentInterface
.
Fields§
§cdylib_name: Option<String>
§module_name: Option<String>
§ffi_module_name: Option<String>
§ffi_module_filename: Option<String>
§generate_module_map: Option<bool>
§omit_argument_labels: Option<bool>
§generate_immutable_records: Option<bool>
§experimental_sendable_value_types: Option<bool>
§custom_types: HashMap<String, CustomTypeConfig>
Implementations§
source§impl Config
impl Config
sourcepub fn module_name(&self) -> String
pub fn module_name(&self) -> String
The name of the Swift module containing the high-level foreign-language bindings.
sourcepub fn ffi_module_name(&self) -> String
pub fn ffi_module_name(&self) -> String
The name of the lower-level C module containing the FFI declarations.
sourcepub fn ffi_module_filename(&self) -> String
pub fn ffi_module_filename(&self) -> String
The filename stem for the lower-level C module containing the FFI declarations.
sourcepub fn modulemap_filename(&self) -> String
pub fn modulemap_filename(&self) -> String
The name of the .modulemap
file for the lower-level C module with FFI declarations.
sourcepub fn header_filename(&self) -> String
pub fn header_filename(&self) -> String
The name of the .h
file for the lower-level C module with FFI declarations.
sourcepub fn cdylib_name(&self) -> String
pub fn cdylib_name(&self) -> String
The name of the compiled Rust library containing the FFI implementation.
sourcepub fn generate_module_map(&self) -> bool
pub fn generate_module_map(&self) -> bool
Whether to generate a .modulemap
file for the lower-level C module with FFI declarations.
sourcepub fn omit_argument_labels(&self) -> bool
pub fn omit_argument_labels(&self) -> bool
Whether to omit argument labels in Swift function definitions.
sourcepub fn generate_immutable_records(&self) -> bool
pub fn generate_immutable_records(&self) -> bool
Whether to generate immutable records (let
instead of var
)
sourcepub fn experimental_sendable_value_types(&self) -> bool
pub fn experimental_sendable_value_types(&self) -> bool
Whether to mark value types as ‘Sendable’
Trait Implementations§
source§impl BindingsConfig for Config
impl BindingsConfig for Config
source§fn update_from_ci(&mut self, ci: &ComponentInterface)
fn update_from_ci(&mut self, ci: &ComponentInterface)
ComponentInterface