Struct uniffi_bindgen::bindings::swift::gen_swift::SwiftCodeOracle
source · pub struct SwiftCodeOracle;
Implementations§
source§impl SwiftCodeOracle
impl SwiftCodeOracle
fn create_code_type(&self, type_: Type) -> Box<dyn CodeType>
fn find(&self, type_: &Type) -> Box<dyn CodeType>
sourcefn class_name(&self, nm: &str) -> String
fn class_name(&self, nm: &str) -> String
Get the idiomatic Swift rendering of a class name (for enums, records, errors, etc).
sourcefn enum_variant_name(&self, nm: &str) -> String
fn enum_variant_name(&self, nm: &str) -> String
Get the idiomatic Swift rendering of an individual enum variant.
sourcefn ffi_callback_name(&self, nm: &str) -> String
fn ffi_callback_name(&self, nm: &str) -> String
Get the idiomatic Swift rendering of an FFI callback function name
sourcefn ffi_struct_name(&self, nm: &str) -> String
fn ffi_struct_name(&self, nm: &str) -> String
Get the idiomatic Swift rendering of an FFI struct name
sourcefn if_guard_name(&self, nm: &str) -> String
fn if_guard_name(&self, nm: &str) -> String
Get the idiomatic Swift rendering of an if guard name
fn ffi_type_label(&self, ffi_type: &FfiType) -> String
sourcefn ffi_default_value(&self, return_type: Option<&FfiType>) -> String
fn ffi_default_value(&self, return_type: Option<&FfiType>) -> String
Default values for FFI types
Used to set a default return value when returning an error
fn ffi_canonical_name(&self, ffi_type: &FfiType) -> String
sourcefn object_names(&self, obj: &Object) -> (String, String)
fn object_names(&self, obj: &Object) -> (String, String)
Get the name of the protocol and class name for an object.
If we support callback interfaces, the protocol name is the object name, and the class name is derived from that. Otherwise, the class name is the object name and the protocol name is derived from that.
This split determines what types FfiConverter.lower()
inputs. If we support callback
interfaces, lower
must lower anything that implements the protocol. If not, then lower
only lowers the concrete class.
Trait Implementations§
source§impl Clone for SwiftCodeOracle
impl Clone for SwiftCodeOracle
source§fn clone(&self) -> SwiftCodeOracle
fn clone(&self) -> SwiftCodeOracle
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more