pub struct NodeSchema {Show 18 fields
pub kind: NodeKindKey,
pub latest_kind_version: u32,
pub kind_aliases: Vec<NodeKindKey>,
pub title: String,
pub category: Vec<String>,
pub keywords: Vec<String>,
pub renderer_key: Option<String>,
pub default_size: Option<CanvasSize>,
pub layout_budget: NodeSurfaceLayoutBudget,
pub ports: Vec<PortDecl>,
pub surface_slots: Vec<NodeSurfaceSlotDescriptor>,
pub repeatable_collections: Vec<NodeRepeatableCollectionDescriptor>,
pub actions: Vec<NodeActionDescriptor>,
pub menus: Vec<MenuDescriptor>,
pub inspectors: Vec<InspectorDescriptor>,
pub blackboards: Vec<BlackboardDescriptor>,
pub chrome: Vec<NodeChromeDescriptor>,
pub default_data: Value,
}Expand description
Schema for a node kind.
Fields§
§kind: NodeKindKeyCanonical kind key.
latest_kind_version: u32Latest schema version for this kind.
kind_aliases: Vec<NodeKindKey>Kind aliases (renames).
title: StringUI-facing title.
category: Vec<String>Category path (for create-node search/palette).
keywords: Vec<String>Search keywords.
renderer_key: Option<String>Adapter-facing renderer key.
Runtime keeps this as data instead of a component reference so React, Svelte, native, and future adapters can map the key to their own renderer registry.
default_size: Option<CanvasSize>Default logical node size for adapters that need an initial rect before measurement.
layout_budget: NodeSurfaceLayoutBudgetSemantic readable-surface budget for adapter-local node internals.
ports: Vec<PortDecl>Declared ports.
surface_slots: Vec<NodeSurfaceSlotDescriptor>Renderer-neutral semantic slots for rich adapter node surfaces.
repeatable_collections: Vec<NodeRepeatableCollectionDescriptor>Renderer-neutral dynamic row/list descriptors for node-local authoring surfaces.
actions: Vec<NodeActionDescriptor>Renderer-neutral action descriptors for node-local authoring surfaces.
Renderer-neutral menu descriptors. Adapters own popup widgets and state.
inspectors: Vec<InspectorDescriptor>Renderer-neutral inspector descriptors. Adapters own panel widgets and focus.
blackboards: Vec<BlackboardDescriptor>Graph-level property lists exposed as adapter-local blackboard panels.
chrome: Vec<NodeChromeDescriptor>Renderer-neutral semantic chrome around rich adapter node surfaces.
default_data: ValueDefault node payload.
Implementations§
Source§impl NodeSchema
impl NodeSchema
Sourcepub fn builder(
kind: impl Into<NodeKindKey>,
title: impl Into<String>,
) -> NodeSchemaBuilder
pub fn builder( kind: impl Into<NodeKindKey>, title: impl Into<String>, ) -> NodeSchemaBuilder
Starts a node schema builder with renderer-neutral defaults.
Sourcepub fn instantiate(&self, pos: CanvasPoint) -> NodeInstantiation
pub fn instantiate(&self, pos: CanvasPoint) -> NodeInstantiation
Instantiates a node and its declared ports with freshly allocated ids.
Sourcepub fn instantiate_with_ids(
&self,
node_id: NodeId,
pos: CanvasPoint,
port_ids: impl IntoIterator<Item = PortId>,
) -> Result<NodeInstantiation, NodeInstantiationError>
pub fn instantiate_with_ids( &self, node_id: NodeId, pos: CanvasPoint, port_ids: impl IntoIterator<Item = PortId>, ) -> Result<NodeInstantiation, NodeInstantiationError>
Instantiates a node and its declared ports with caller-provided ids.
Trait Implementations§
Source§impl Clone for NodeSchema
impl Clone for NodeSchema
Source§fn clone(&self) -> NodeSchema
fn clone(&self) -> NodeSchema
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NodeSchema
impl Debug for NodeSchema
Source§impl<'de> Deserialize<'de> for NodeSchema
impl<'de> Deserialize<'de> for NodeSchema
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>,
Source§impl From<NodeSchemaBuilder> for NodeSchema
impl From<NodeSchemaBuilder> for NodeSchema
Source§fn from(value: NodeSchemaBuilder) -> Self
fn from(value: NodeSchemaBuilder) -> Self
Source§impl PartialEq for NodeSchema
impl PartialEq for NodeSchema
Source§fn eq(&self, other: &NodeSchema) -> bool
fn eq(&self, other: &NodeSchema) -> bool
self and other values to be equal, and is used by ==.