Skip to main content

GraphManager

Trait GraphManager 

Source
pub trait GraphManager<G>: Send + Sync
where G: Send + Sync,
{ // Required methods fn initialize_graph( &mut self, components: &HashMap<ComponentId, Vec<Address>>, ); fn graph(&self) -> &G; }
Expand description

Trait for managing graph representations.

Graph managers are stateful - they maintain the graph internally and update it based on market events.

Required Methods§

Source

fn initialize_graph(&mut self, components: &HashMap<ComponentId, Vec<Address>>)

Initializes the graph from the market topology.

Arguments:

  • components: A map of component IDs to their tokens addresses.
Source

fn graph(&self) -> &G

Returns a reference to the managed graph.

Implementors§