pub trait Extension: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn procedures(&self) -> Vec<ProcedureSignature>;
fn execute(
&self,
procedure: &str,
args: &[String],
adjacency: &HashMap<i64, Vec<(i64, f64)>>,
) -> Result<Vec<Vec<TypedValue>>, String>;
// Provided method
fn needs_graph(&self) -> bool { ... }
}Expand description
Trait that every extension must implement.
Required Methods§
Sourcefn procedures(&self) -> Vec<ProcedureSignature>
fn procedures(&self) -> Vec<ProcedureSignature>
List all procedures this extension provides.
Provided Methods§
Sourcefn needs_graph(&self) -> bool
fn needs_graph(&self) -> bool
Whether this extension needs the graph adjacency map.
Defaults to false. Override to true for graph algorithm extensions.