Crate sodg

Crate sodg 

Source
Expand description

This is a memory structure with vertices and edges between them, which we call Surging Object DiGraph (SODG), because it expects modifications comping from a user (through Sodg::add, Sodg::bind, and Sodg::put) and then decides itself when it’s time to delete some vertices (something similar to “garbage collection”).

For example, here is how you create a simple di-graph with two vertices and an edge between them:

use sodg::Sodg;
let mut sodg = Sodg::empty();
sodg.add(0).unwrap();
sodg.add(1).unwrap();
sodg.bind(0, 1, "foo").unwrap();

Structs§

ConstRelay
A Relay that always returns the same String.
DeadRelay
A Relay that doesn’t even try to find anything, but returns an error.
LambdaRelay
A Relay that is made of a lambda function.
Script
A wrapper of a plain text with graph-modifying instructions.
Sodg
A struct that represents a Surging Object Di-Graph (SODG).

Enums§

Hex
An object-oriented representation of binary data in hexadecimal format, which can be put into vertices of the graph.

Traits§

Relay
A relay that is used by Sodg::find() when it can’t find an attribute.

Type Aliases§

Alert
A function that is called when a problem is found in Sodg.