Struct datafusion_jit::api::FunctionBuilder
source · pub struct FunctionBuilder { /* private fields */ }
Expand description
Function builder API. Stores the state while we are constructing an AST for a function.
Implementations§
source§impl FunctionBuilder
impl FunctionBuilder
sourcepub fn param(self, name: impl Into<String>, ty: JITType) -> Self
pub fn param(self, name: impl Into<String>, ty: JITType) -> Self
Add one more parameter to the function.
sourcepub fn ret(self, name: impl Into<String>, ty: JITType) -> Self
pub fn ret(self, name: impl Into<String>, ty: JITType) -> Self
Set return type for the function. Functions are of void
type by default if
you do not set the return type.
sourcepub fn enter_block(&mut self) -> CodeBlock<'_>
pub fn enter_block(&mut self) -> CodeBlock<'_>
Enter the function body at start the building.