Skip to main content

NodeKindViewDescriptor

Struct NodeKindViewDescriptor 

Source
pub struct NodeKindViewDescriptor {
Show 16 fields pub kind: NodeKindKey, pub renderer_key: String, pub title: String, pub category: Vec<String>, pub keywords: Vec<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

Renderer-neutral node-kind descriptor for adapter palettes and renderer lookup.

Fields§

§kind: NodeKindKey

Canonical kind key.

§renderer_key: String

Adapter-owned renderer lookup key.

§title: String

UI-facing title.

§category: Vec<String>

Category path for create-node search/palette grouping.

§keywords: Vec<String>

Search keywords.

§default_size: Option<CanvasSize>

Default logical node size for initial adapter layout before measurement.

§layout_budget: NodeSurfaceLayoutBudget

Semantic 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.

§menus: Vec<MenuDescriptor>

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: Value

Default node payload.

Implementations§

Source§

impl NodeKindViewDescriptor

Source

pub fn port_decl(&self, key: impl AsRef<str>) -> Option<&PortDecl>

Source

pub fn ports_by_anchor(&self, anchor: impl AsRef<str>) -> Vec<&PortDecl>

Source

pub fn port_decl_by_anchor(&self, anchor: impl AsRef<str>) -> Option<&PortDecl>

Source

pub fn surface_slot( &self, key: impl AsRef<str>, ) -> Option<&NodeSurfaceSlotDescriptor>

Source

pub fn surface_slots_of_kind( &self, kind: NodeSurfaceSlotKind, ) -> Vec<&NodeSurfaceSlotDescriptor>

Source

pub fn surface_slots_by_anchor( &self, anchor: impl AsRef<str>, ) -> Vec<&NodeSurfaceSlotDescriptor>

Source

pub fn surface_slot_by_anchor( &self, anchor: impl AsRef<str>, ) -> Option<&NodeSurfaceSlotDescriptor>

Source

pub fn repeatable_collection( &self, key: impl AsRef<str>, ) -> Option<&NodeRepeatableCollectionDescriptor>

Source

pub fn repeatable_items_projection( &self, node_data: &Value, collection_key: impl AsRef<str>, ) -> Vec<NodeRepeatableItemProjection>

Source

pub fn action(&self, key: impl AsRef<str>) -> Option<&NodeActionDescriptor>

Source

pub fn menu(&self, key: impl AsRef<str>) -> Option<&MenuDescriptor>

Source

pub fn inspector(&self, key: impl AsRef<str>) -> Option<&InspectorDescriptor>

Source

pub fn blackboard(&self, key: impl AsRef<str>) -> Option<&BlackboardDescriptor>

Source

pub fn surface_slots_projection( &self, node_data: &Value, layout_hints: Option<&NodeKitLayoutHints>, zoom: f32, ) -> Vec<NodeSurfaceSlotProjection>

Trait Implementations§

Source§

impl Clone for NodeKindViewDescriptor

Source§

fn clone(&self) -> NodeKindViewDescriptor

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeKindViewDescriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for NodeKindViewDescriptor

Source§

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 PartialEq for NodeKindViewDescriptor

Source§

fn eq(&self, other: &NodeKindViewDescriptor) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for NodeKindViewDescriptor

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for NodeKindViewDescriptor

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.