Trait raphtory_graphql::model::algorithms::algorithm::Algorithm

source ·
pub trait Algorithm<'a, A: AlgorithmEntryPoint<'a> + 'static> {
    type OutputType: Register + 'static;

    // Required methods
    fn output_type() -> TypeRef;
    fn args<'b>() -> Vec<(&'b str, TypeRef)>;
    fn apply_algo<'b>(
        entry_point: &A,
        ctx: ResolverContext<'_>,
    ) -> BoxFuture<'b, FieldResult<Option<FieldValue<'b>>>>;

    // Provided method
    fn register_algo(
        name: &str,
        registry: Registry,
        parent: Object,
    ) -> (Registry, Object) { ... }
}

Required Associated Types§

source

type OutputType: Register + 'static

Required Methods§

source

fn output_type() -> TypeRef

source

fn args<'b>() -> Vec<(&'b str, TypeRef)>

source

fn apply_algo<'b>( entry_point: &A, ctx: ResolverContext<'_>, ) -> BoxFuture<'b, FieldResult<Option<FieldValue<'b>>>>

Provided Methods§

source

fn register_algo( name: &str, registry: Registry, parent: Object, ) -> (Registry, Object)

Object Safety§

This trait is not object safe.

Implementors§