pub trait ExpressionPlugin:
Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> &str;
fn overloads(&self) -> Vec<ExprOverloadDesc>;
fn evaluate(
&self,
overload_index: usize,
args: &[ExprArg<'_>],
cx: &ExprEvalCx<'_>,
) -> Result<ExprValue, String>;
}Expand description
A custom MapLibre style expression function implemented in Rust.
Implementations must be thread-safe (Send + Sync + 'static) because
evaluation may run on the render thread, tile layout worker threads, or
standalone expression evaluation threads concurrently.
Required Methods§
Sourcefn overloads(&self) -> Vec<ExprOverloadDesc>
fn overloads(&self) -> Vec<ExprOverloadDesc>
One or more overload signatures accepted by this function.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".