pub struct Graph {
pub schema_version: u32,
pub nodes: Vec<Node>,
pub edges: Vec<Edge>,
}Expand description
A graph document: the control document authored once, submitted, hashed into a run, and then frozen. It carries the schema version, the set of nodes (each with a stable string id), and the edges that connect them.
Serializing a Graph always includes schema_version, so the wire form is
self-describing. Unknown top-level keys are rejected.
Fields§
§schema_version: u32The document schema version. Always SCHEMA_VERSION for documents
this build writes; an older value may appear when reading a recorded
document.
nodes: Vec<Node>The nodes, each identified by a stable string id unique within the document.
edges: Vec<Edge>The directed edges connecting nodes. A document with a single node and no edges is legal, so this defaults to empty.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Graph
impl<'de> Deserialize<'de> for Graph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Graph
impl JsonSchema for Graph
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Graph
Auto Trait Implementations§
impl Freeze for Graph
impl RefUnwindSafe for Graph
impl Send for Graph
impl Sync for Graph
impl Unpin for Graph
impl UnsafeUnpin for Graph
impl UnwindSafe for Graph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more