[][src]Module grandma::plugins

Plugin System

To implement a plugin you need to write 2 components one which implements NodePlugin and another that implements TreePlugin. Finally you need to create an object that implements the parent trait that glues the two objects together.

The NodePlugin is attached to each node. It is created by the node_component function in the parent trait when the plugin is attached to the tree. It can access the TreePlugin component, and the tree. These are created recursively, so you can access the plugin for the child nodes.

None of this is parallelized. We need to move to Tokio to take advantage of the async computation there to || it.

Modules

distributions

Probability Distributions Plugins

labels

Plugin for labels

Traits

GrandmaPlugin

Parent trait that make this all work. Ideally this should be included in the TreePlugin but rust doesn't like it.

NodePlugin

Mockup for the plugin interface attached to the node. These are meant to be functions that Grandma uses to maintain the plugin.

TreePlugin

Mockup for the plugin parameters attached to the base of the tree.