Struct ligen_c_core::generator::Generator [−][src]
pub struct Generator;
Expand description
Generator structure.
Trait Implementations
type ImplementationProcessor = ImplementationProcessor
type ImplementationProcessor = ImplementationProcessor
Implementation processor.
type FunctionProcessor = FunctionProcessor
type FunctionProcessor = FunctionProcessor
Function processor.
type ParameterProcessor = ParameterProcessor
type ParameterProcessor = ParameterProcessor
Parameter processor.
Creates a new generator using contextual information and attributes.
fn pre_process(
&self,
_context: &Context,
implementation: Option<&Implementation>
) -> Option<Implementation>
fn pre_process(
&self,
_context: &Context,
implementation: Option<&Implementation>
) -> Option<Implementation>
Pre-processes the input. The default implementation returns a transformed input with all the
Self
and self
occurrences replaced by the actual object name. Read more
fn generate(
&self,
context: &Context,
implementation: Option<&Implementation>
) -> Result<TokenStream, Error>
fn generate(
&self,
context: &Context,
implementation: Option<&Implementation>
) -> Result<TokenStream, Error>
Main function called in the procedural macro.
fn save_file_set(
&self,
context: &Context,
file_set: FileSet
) -> Result<(), Error>
fn save_file_set(
&self,
context: &Context,
file_set: FileSet
) -> Result<(), Error>
Saves the file set.
fn generate_parameters(
_context: &Context,
inputs: &Vec<Parameter, Global>
) -> TokenStream
fn generate_parameters(
_context: &Context,
inputs: &Vec<Parameter, Global>
) -> TokenStream
Generate the function parameters.
fn generate_arguments(
_context: &Context,
inputs: &Vec<Parameter, Global>
) -> TokenStream
fn generate_arguments(
_context: &Context,
inputs: &Vec<Parameter, Global>
) -> TokenStream
Generate the function call arguments and its conversions.
fn to_marshal_output(type_: &Type) -> TokenStream
fn to_marshal_output(type_: &Type) -> TokenStream
Marshal type.
fn to_marshal_parameter(type_: &Type) -> TokenStream
fn to_marshal_parameter(type_: &Type) -> TokenStream
Marshal type.
fn generate_output(_context: &Context, output: &Option<Type>) -> TokenStream
fn generate_output(_context: &Context, output: &Option<Type>) -> TokenStream
Generate the function output.
fn generate_function_signature(
context: &Context,
visitor: &Visitor<Visitor<(), Implementation>, Function>
) -> TokenStream
fn generate_function_signature(
context: &Context,
visitor: &Visitor<Visitor<(), Implementation>, Function>
) -> TokenStream
Generate the function
fn generate_function_block(
context: &Context,
visitor: &Visitor<Visitor<(), Implementation>, Function>
) -> TokenStream
fn generate_function_block(
context: &Context,
visitor: &Visitor<Visitor<(), Implementation>, Function>
) -> TokenStream
Generate the function
fn generate_function(
context: &Context,
visitor: &Visitor<Visitor<(), Implementation>, Function>
) -> TokenStream
fn generate_function(
context: &Context,
visitor: &Visitor<Visitor<(), Implementation>, Function>
) -> TokenStream
Generate an extern function for an implementation method.
fn generate_drop(visitor: &Visitor<(), Implementation>) -> TokenStream
fn generate_drop(visitor: &Visitor<(), Implementation>) -> TokenStream
Generate drop extern.
fn generate(
context: &Context,
implementation: &Visitor<(), Implementation>
) -> TokenStream
fn generate(
context: &Context,
implementation: &Visitor<(), Implementation>
) -> TokenStream
Generate externs for Constants and Methods.
Auto Trait Implementations
impl RefUnwindSafe for Generator
impl UnwindSafe for Generator
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn generate_ffi(
&self,
context: &Context,
implementation: Option<&Visitor<(), Implementation>>
) -> TokenStream
pub fn generate_ffi(
&self,
context: &Context,
implementation: Option<&Visitor<(), Implementation>>
) -> TokenStream
Generate FFI.
pub fn generate_files(
&self,
context: &Context,
file_set: &mut FileSet,
visitor: Option<&Visitor<(), Implementation>>
)
pub fn generate_files(
&self,
context: &Context,
file_set: &mut FileSet,
visitor: Option<&Visitor<(), Implementation>>
)
Generate files.