pub struct NodeSpec {
pub op: String,
pub fields: Map<String, Value>,
}Expand description
One node entry. op selects the implementation; remaining fields are
op-specific and are validated by the NodeFactory registered for op.
Fields§
§op: String§fields: Map<String, Value>All remaining fields. Scalars are literals (color, number, bool);
strings that begin with @ are node references, strings that
begin with $ are param references.
Implementations§
Source§impl NodeSpec
impl NodeSpec
Sourcepub fn refs(&self) -> Vec<String>
pub fn refs(&self) -> Vec<String>
Every @name this node’s fields mention, in traversal order and
with duplicates kept.
The scan is over the raw JSON rather than a per-op field list, because that is what the wiring is: any string field may carry a reference, at any depth, including inside an expression array. A name here has not been resolved — it may be a node, a source, or nothing at all.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeSpec
impl<'de> Deserialize<'de> for NodeSpec
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
Auto Trait Implementations§
impl Freeze for NodeSpec
impl RefUnwindSafe for NodeSpec
impl Send for NodeSpec
impl Sync for NodeSpec
impl Unpin for NodeSpec
impl UnsafeUnpin for NodeSpec
impl UnwindSafe for NodeSpec
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