mod bridge

module bridge

Enums

enum EpochArg
Handle(Py<Epoch>)
Root(u32)

Structs and Unions

struct PyScheduler(Scheduler)

PyO3 class that bridges between the pure-rust Scheduler and its python counterpart Only those methods that do something beyond forwarding calls with string interning have public docstrings. For the rest, see either the Python or Rust scheduler. (Methods being marked public is purely a documentation detail because the PyO3 macro makes them so anyway)

Implementations

impl PyScheduler

Functions

fn node_is_done(&self, node: String, epoch: Epoch) -> PyResult<bool>

Check if a node has been either run or expired in the given epoch

Similarly to node_is_ready, raises NotAddedError if node has not been previously added.

fn node_is_ready(&self, node: String, epoch: Epoch, subepochs: bool) -> PyResult<bool>

Check if a node is ready in a given epoch without marking it as out

Raises a NotAdded error if the node has not been previously added to the graph, rather than automatically interning: differentiates simply not being ready from not existing at all

fn update(&mut self, events: Vec<(EpochArg, String, String, bool)>) -> PyResult<Vec<Epoch>>

Accept recast events from the python scheduler, intern the strings to ints, filter the events to only those whose signals are in the graph, (e.g., not disabled, etc.) and pass to the internal update method.

struct UpdateEvent

A single event to update the scheduler state from emitted by a node. After interning python strings to ints and extracting other string values.

epoch: Epoch
node: ItemID
signal: Option<ItemID>
no_event: bool