Struct uniffi_bindgen::bindings::python::gen_python::PythonCodeOracle
source · pub struct PythonCodeOracle;
Implementations§
source§impl PythonCodeOracle
impl PythonCodeOracle
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 Python 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 Python 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 Python 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 Python rendering of an FFI struct 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
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 PythonCodeOracle
impl Clone for PythonCodeOracle
source§fn clone(&self) -> PythonCodeOracle
fn clone(&self) -> PythonCodeOracle
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more