pub trait TableFunction:
Send
+ Sync
+ Debug {
// Required methods
fn name(&self) -> &str;
fn execute(
&self,
args: &[Value],
) -> Result<Vec<Vec<Value>>, ExpressionError>;
fn description(&self) -> &str;
}Expand description
Table function trait for functions that return rows of data.
Unlike scalar functions that return a single Value, table functions
return multiple rows, each row being a Vec<Value>.
Required Methods§
Sourcefn execute(&self, args: &[Value]) -> Result<Vec<Vec<Value>>, ExpressionError>
fn execute(&self, args: &[Value]) -> Result<Vec<Vec<Value>>, ExpressionError>
Execute the table function with the given arguments. Returns a vector of rows, where each row is a vector of values.
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Function description
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".