//! User functions
modcontext;moduser_functions;usecrate::value::Value;useasync_trait::async_trait;pubusecontext::FunctionContext;usestd::result;pubuseuser_functions::UserFunctions;/// User functions should implement this trait
#[async_trait]pubtraitUserFunction{/// Call the userfunction, parameters are passed in as a Value
async fncall(&self, params: Value)-> FunctionResult;/// The name of the user-function
fnname(&self)->&'staticstr;/// Indicates if results of this function can be cached,
/// true by default
fncacheable(&self)->bool{true}}/// Result type returned from UserFunction
pubtypeFunctionResult=result::Result<Value, anyhow::Error>;