pub struct Graph {
pub nodes: Vec<Node>,
pub by_name: BTreeMap<Arc<str>, SigId>,
pub dep: DepGraph,
pub cuts: Vec<Cut>,
pub sinks: Vec<SigId>,
}Expand description
The signal graph of one program.
Fields§
§nodes: Vec<Node>§by_name: BTreeMap<Arc<str>, SigId>Declared signal names to their vertices. Inner vertices are not in here — they have no name a program can write.
dep: DepGraphThe condensation, for cycles and for order.
cuts: Vec<Cut>§sinks: Vec<SigId>Vertices nothing reads. A view is one; so is a materialised read model.
Implementations§
Source§impl Graph
impl Graph
pub fn node(&self, id: SigId) -> &Node
Sourcepub fn order(&self) -> Vec<SigId> ⓘ
pub fn order(&self) -> Vec<SigId> ⓘ
Every vertex, dependencies before dependents, cycle members adjacent.
pub fn find(&self, f: impl Fn(&Op) -> bool) -> Vec<SigId> ⓘ
Sourcepub fn states(&self) -> Vec<SigId> ⓘ
pub fn states(&self) -> Vec<SigId> ⓘ
The durable accumulators, in declaration order — what the log is of.
pub fn ingress(&self) -> Vec<SigId> ⓘ
Sourcepub fn awarenesses(&self) -> Vec<SigId> ⓘ
pub fn awarenesses(&self) -> Vec<SigId> ⓘ
The awareness rosters — presence with a payload, and not in the log either.
Sourcepub fn gestures(&self) -> Vec<SigId> ⓘ
pub fn gestures(&self) -> Vec<SigId> ⓘ
The non-durable folds — D30’s client-local interface state, and the fourth thing here that is not in the log. The strongest case of it: a gesture is not merely absent from the log, it never travelled far enough to be a candidate for one.
Sourcepub fn freshnesses(&self) -> Vec<SigId> ⓘ
pub fn freshnesses(&self) -> Vec<SigId> ⓘ
The freshness sources — the other thing that is not in the log, and for the same reason: nothing about which commands a browser had not heard back about is written down anywhere.