Struct interoptopus_backend_c::Generator [−][src]
pub struct Generator { /* fields omitted */ }
Implementations
Trait Implementations
Generates FFI binding code and writes them to the IndentWriter
.
Converts a primitive (Rust) type to a native C# type name, e.g., f32
to float
.
Converts a Rust enum name such as Error
to a C# enum name Error
.
TODO Converts an opaque Rust struct Context
to a C# struct ``.
Converts an Rust struct name Vec2
to a C# struct name Vec2
.
Converts an Rust fn()
to a C# delegate name such as InteropDelegate
.
Converts the u32
part in a Rust paramter x: u32
to a C# equivalent. Might convert pointers to out X
or ref X
.
fn function_parameter_to_csharp_typename(
&self,
x: &Parameter,
_function: &Function
) -> String
fn write_documentation(
&self,
w: &mut IndentWriter<'_>,
documentation: &Documentation
) -> Result<(), Error>
fn write_function_declaration(
&self,
w: &mut IndentWriter<'_>,
function: &Function
) -> Result<(), Error>
fn write_type_definition(
&self,
w: &mut IndentWriter<'_>,
the_type: &CType
) -> Result<(), Error>
fn write_type_definition_fn_pointer(
&self,
w: &mut IndentWriter<'_>,
the_type: &FnPointerType
) -> Result<(), Error>
fn write_type_definition_fn_pointer_body(
&self,
w: &mut IndentWriter<'_>,
the_type: &FnPointerType
) -> Result<(), Error>
fn write_type_definition_enum(
&self,
w: &mut IndentWriter<'_>,
the_type: &EnumType
) -> Result<(), Error>
fn write_type_definition_enum_variant(
&self,
w: &mut IndentWriter<'_>,
variant: &Variant,
_the_type: &EnumType
) -> Result<(), Error>
fn write_type_definition_opaque(
&self,
w: &mut IndentWriter<'_>,
the_type: &OpaqueType
) -> Result<(), Error>
fn write_type_definition_opaque_body(
&self,
w: &mut IndentWriter<'_>,
the_type: &OpaqueType
) -> Result<(), Error>
fn write_type_definition_composite(
&self,
w: &mut IndentWriter<'_>,
the_type: &CompositeType
) -> Result<(), Error>
fn write_type_definition_composite_body(
&self,
w: &mut IndentWriter<'_>,
the_type: &CompositeType
) -> Result<(), Error>
fn write_type_definition_composite_body_field(
&self,
w: &mut IndentWriter<'_>,
field: &Field,
_the_type: &CompositeType
) -> Result<(), Error>
fn write_ifndef(
&self,
w: &mut IndentWriter<'_>,
f: impl FnOnce(&mut IndentWriter<'_>) -> Result<(), Error>
) -> Result<(), Error>
fn write_ifdefcpp(
&self,
w: &mut IndentWriter<'_>,
f: impl FnOnce(&mut IndentWriter<'_>) -> Result<(), Error>
) -> Result<(), Error>
Auto Trait Implementations
impl RefUnwindSafe for Generator
impl UnwindSafe for Generator