pub struct GraphDescribeOutput {
pub name: String,
pub nodes: IndexMap<String, NodeDescribe>,
pub edges: Vec<EdgeDescribe>,
pub subgraphs: Vec<String>,
pub factory: Option<String>,
pub factory_args: Option<Value>,
}Expand description
Top-level describe() output (canonical Appendix B JSON schema).
§factory + factoryArgs (R3.1.2, D285)
factory / factory_args are populated from
crate::graph::GraphInner::factory / factory_args (set via
crate::Graph::tag_factory). Both use skip_serializing_if = "Option::is_none" to match the pure-ts spread-conditional shape at
packages/pure-ts/src/graph/graph.ts:3508-3509 — a cold describe()
before any tag_factory call OMITS the factory / factoryArgs
keys entirely (not serializes them as null). The pure-ts arm
pins this via the "factoryArgs" in desc assertion in
scenarios/graph/tag-factory.test.ts:70 (QA-A2 invariant); the
Rust JSON shape converges via skip_serializing_if + rename = "factoryArgs" for the camelCase key parity.
Fields§
§name: StringGraph name as set at construction / mount.
nodes: IndexMap<String, NodeDescribe>Local nodes by name.
edges: Vec<EdgeDescribe>Local edges (dep → consumer).
subgraphs: Vec<String>Mounted child names.
factory: Option<String>R3.1.2 factory provenance — name set via
crate::Graph::tag_factory. Omitted from JSON when None
(matches pure-ts spread-conditional shape).
factory_args: Option<Value>R3.1.2 factory args — paired with Self::factory. Omitted
from JSON when None. Serialized as the factoryArgs camelCase
key to match pure-ts output byte-for-byte.
Trait Implementations§
Source§impl Clone for GraphDescribeOutput
impl Clone for GraphDescribeOutput
Source§fn clone(&self) -> GraphDescribeOutput
fn clone(&self) -> GraphDescribeOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more