pub trait CWriter {
Show 31 methods // Required methods fn config(&self) -> &Config; fn inventory(&self) -> &Inventory; fn converter(&self) -> &Converter; // Provided methods fn write_custom_defines( &self, w: &mut IndentWriter<'_> ) -> Result<(), Error> { ... } fn write_file_header_comments( &self, w: &mut IndentWriter<'_> ) -> Result<(), Error> { ... } fn write_imports(&self, w: &mut IndentWriter<'_>) -> Result<(), Error> { ... } fn write_constants(&self, w: &mut IndentWriter<'_>) -> Result<(), Error> { ... } fn write_constant( &self, w: &mut IndentWriter<'_>, constant: &Constant ) -> Result<(), Error> { ... } fn write_functions(&self, w: &mut IndentWriter<'_>) -> Result<(), Error> { ... } fn write_function( &self, w: &mut IndentWriter<'_>, function: &Function ) -> Result<(), Error> { ... } fn write_function_declaration( &self, w: &mut IndentWriter<'_>, function: &Function, max_line: usize ) -> Result<(), Error> { ... } fn write_function_as_typedef_declaration( &self, w: &mut IndentWriter<'_>, function: &Function ) -> Result<(), Error> { ... } fn write_documentation( &self, w: &mut IndentWriter<'_>, documentation: &Documentation ) -> Result<(), Error> { ... } fn write_type_definitions( &self, w: &mut IndentWriter<'_> ) -> Result<(), Error> { ... } fn write_type_definition( &self, w: &mut IndentWriter<'_>, the_type: &CType, known_function_pointers: &mut Vec<String> ) -> Result<(), Error> { ... } fn write_type_definition_fn_pointer( &self, w: &mut IndentWriter<'_>, the_type: &FnPointerType, known_function_pointers: &mut Vec<String> ) -> Result<(), Error> { ... } fn write_type_definition_fn_pointer_body( &self, w: &mut IndentWriter<'_>, the_type: &FnPointerType, known_function_pointers: &mut Vec<String> ) -> Result<(), Error> { ... } fn write_type_definition_named_callback( &self, w: &mut IndentWriter<'_>, the_type: &NamedCallback ) -> Result<(), Error> { ... } fn write_type_definition_named_callback_body( &self, w: &mut IndentWriter<'_>, the_type: &NamedCallback ) -> 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_enum: &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> { ... } fn write_all(&self, w: &mut IndentWriter<'_>) -> Result<(), Error> { ... } fn write_braced_declaration_opening( &self, w: &mut IndentWriter<'_>, definition: String ) -> Result<(), Error> { ... } fn write_braced_declaration_closing( &self, w: &mut IndentWriter<'_>, name: String ) -> Result<(), Error> { ... }
}
Expand description

Writes the C file format, impl this trait to customize output.

Required Methods§

source

fn config(&self) -> &Config

Returns the user config.

source

fn inventory(&self) -> &Inventory

Returns the library to produce bindings for.

source

fn converter(&self) -> &Converter

Returns the library to produce bindings for.

Provided Methods§

source

fn write_custom_defines(&self, w: &mut IndentWriter<'_>) -> Result<(), Error>

source

fn write_file_header_comments( &self, w: &mut IndentWriter<'_> ) -> Result<(), Error>

source

fn write_imports(&self, w: &mut IndentWriter<'_>) -> Result<(), Error>

source

fn write_constants(&self, w: &mut IndentWriter<'_>) -> Result<(), Error>

source

fn write_constant( &self, w: &mut IndentWriter<'_>, constant: &Constant ) -> Result<(), Error>

source

fn write_functions(&self, w: &mut IndentWriter<'_>) -> Result<(), Error>

source

fn write_function( &self, w: &mut IndentWriter<'_>, function: &Function ) -> Result<(), Error>

source

fn write_function_declaration( &self, w: &mut IndentWriter<'_>, function: &Function, max_line: usize ) -> Result<(), Error>

source

fn write_function_as_typedef_declaration( &self, w: &mut IndentWriter<'_>, function: &Function ) -> Result<(), Error>

source

fn write_documentation( &self, w: &mut IndentWriter<'_>, documentation: &Documentation ) -> Result<(), Error>

source

fn write_type_definitions(&self, w: &mut IndentWriter<'_>) -> Result<(), Error>

source

fn write_type_definition( &self, w: &mut IndentWriter<'_>, the_type: &CType, known_function_pointers: &mut Vec<String> ) -> Result<(), Error>

source

fn write_type_definition_fn_pointer( &self, w: &mut IndentWriter<'_>, the_type: &FnPointerType, known_function_pointers: &mut Vec<String> ) -> Result<(), Error>

source

fn write_type_definition_fn_pointer_body( &self, w: &mut IndentWriter<'_>, the_type: &FnPointerType, known_function_pointers: &mut Vec<String> ) -> Result<(), Error>

source

fn write_type_definition_named_callback( &self, w: &mut IndentWriter<'_>, the_type: &NamedCallback ) -> Result<(), Error>

source

fn write_type_definition_named_callback_body( &self, w: &mut IndentWriter<'_>, the_type: &NamedCallback ) -> Result<(), Error>

source

fn write_type_definition_enum( &self, w: &mut IndentWriter<'_>, the_type: &EnumType ) -> Result<(), Error>

source

fn write_type_definition_enum_variant( &self, w: &mut IndentWriter<'_>, variant: &Variant, the_enum: &EnumType ) -> Result<(), Error>

source

fn write_type_definition_opaque( &self, w: &mut IndentWriter<'_>, the_type: &OpaqueType ) -> Result<(), Error>

source

fn write_type_definition_opaque_body( &self, w: &mut IndentWriter<'_>, the_type: &OpaqueType ) -> Result<(), Error>

source

fn write_type_definition_composite( &self, w: &mut IndentWriter<'_>, the_type: &CompositeType ) -> Result<(), Error>

source

fn write_type_definition_composite_body( &self, w: &mut IndentWriter<'_>, the_type: &CompositeType ) -> Result<(), Error>

source

fn write_type_definition_composite_body_field( &self, w: &mut IndentWriter<'_>, field: &Field, _the_type: &CompositeType ) -> Result<(), Error>

source

fn write_ifndef( &self, w: &mut IndentWriter<'_>, f: impl FnOnce(&mut IndentWriter<'_>) -> Result<(), Error> ) -> Result<(), Error>

source

fn write_ifdefcpp( &self, w: &mut IndentWriter<'_>, f: impl FnOnce(&mut IndentWriter<'_>) -> Result<(), Error> ) -> Result<(), Error>

source

fn write_all(&self, w: &mut IndentWriter<'_>) -> Result<(), Error>

source

fn write_braced_declaration_opening( &self, w: &mut IndentWriter<'_>, definition: String ) -> Result<(), Error>

source

fn write_braced_declaration_closing( &self, w: &mut IndentWriter<'_>, name: String ) -> Result<(), Error>

Object Safety§

This trait is not object safe.

Implementors§