Crate moongraph

Source
Expand description

DAG scheduling, resource management, and execution.

In moongraph, nodes are functions with parameters that are accessed immutably, mutably or by move.

moongraph validates and schedules nodes to run in parallel where possible, using rayon as the underlying parallelizing tech.

Modules§

rayon_impl
Rayon implementations.
tutorial
Intro to Moongraph 🌙📈

Macros§

graph
Constructs a Graph using an intuitive shorthand for node ordering relationships.

Structs§

Batch
BatchResult
Batches
Provides access to consecutive batches of scheduled nodes/functions.
Execution
Contains the nodes/functions and specifies their execution order.
Function
A function wrapper.
Graph
An acyclic, directed graph made up of nodes/functions and edges/resources.
Move
Specifies a graph edge/resource that is “moved” by a node.
NoDefault
Valueless type that represents the inability to generate a resource by default.
Node
A named node in a graph.
SomeDefault
Valueless type that represents the ability to generate a resource by default.
TypeKey
A key for a type-erased value.
TypeMap
A map of type identifiers to type-erased values.
View
Immutably borrowed resource that may be created by default.
ViewMut
A mutably borrowed resource that may be created by default.

Enums§

BroomdogErr
DaggaError
An error in dag creation or scheduling.
GraphError
All errors.

Traits§

Edges
Trait for describing types that are made up of graph edges (ie resources).
Gen
Used to generate a default value of a resource, if possible.
IsGraphNode
Defines graph nodes.
NodeResults
Trait for describing types that are the result of running a node.

Functions§

end
Returns a result meaning everything is ok, but the node should be removed from the graph.
err
Returns a result meaning an error occured and the graph cannot recover.
ok
Returns a result meaning everything is ok and the node should run again next frame.

Type Aliases§

FnMutRun
FnPrepare
FnSave
Resource

Derive Macros§

Edges
Macro for deriving structs that encode a node’s edges/resource usage.