pub trait AlgorithmProvider: Send + Sync {
// Required methods
fn signature(&self) -> &AlgorithmSignature;
fn run(
&self,
ctx: AlgorithmContext<'_>,
) -> Result<SendableRecordBatchStream, FnError>;
}Expand description
A black-box graph algorithm.
The trait is intentionally minimal: a signature describing the output,
plus a run method returning a streaming RecordBatch sequence. The
algorithm is responsible for fetching graph data via host APIs (out of
scope of this trait — uni-algo will provide a GraphView abstraction
the host adapter passes via AlgorithmContext once those APIs are
available).
Required Methods§
Sourcefn signature(&self) -> &AlgorithmSignature
fn signature(&self) -> &AlgorithmSignature
Static signature.
Sourcefn run(
&self,
ctx: AlgorithmContext<'_>,
) -> Result<SendableRecordBatchStream, FnError>
fn run( &self, ctx: AlgorithmContext<'_>, ) -> Result<SendableRecordBatchStream, FnError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".