pub struct NodeSurfaceSlotDescriptor {
pub key: String,
pub kind: NodeSurfaceSlotKind,
pub label: Option<String>,
pub order: Option<i32>,
pub anchor: Option<String>,
pub lane: Option<String>,
pub slot: Option<String>,
pub renderer_key: Option<String>,
pub icon_key: Option<String>,
pub visibility: Option<NodeSurfaceSlotVisibility>,
pub controls: Vec<NodeControlDescriptor>,
}Expand description
Renderer-neutral node-local slot metadata for rich adapter surfaces.
Fields§
§key: StringStable slot key within the node kind, such as header.main or field.primary_key.
kind: NodeSurfaceSlotKindSemantic role that adapters map to toolkit-specific widgets.
label: Option<String>Optional UI-facing label.
order: Option<i32>Deterministic order within the slot kind/lane.
anchor: Option<String>Optional adapter anchor id used by ports or nested regions.
lane: Option<String>Optional lane key for adapters that group slots.
slot: Option<String>Optional sub-slot key inside a lane or anchor.
renderer_key: Option<String>Optional adapter renderer key for this slot.
icon_key: Option<String>Optional adapter icon key.
visibility: Option<NodeSurfaceSlotVisibility>Optional visibility hint.
controls: Vec<NodeControlDescriptor>Renderer-neutral controls adapters can map to local toolkit widgets.
Implementations§
Source§impl NodeSurfaceSlotDescriptor
impl NodeSurfaceSlotDescriptor
pub fn new(key: impl Into<String>, kind: NodeSurfaceSlotKind) -> Self
pub fn header(key: impl Into<String>) -> Self
pub fn body(key: impl Into<String>) -> Self
pub fn badge(key: impl Into<String>) -> Self
pub fn icon(key: impl Into<String>) -> Self
pub fn field_row(key: impl Into<String>) -> Self
pub fn action_row(key: impl Into<String>) -> Self
pub fn preview(key: impl Into<String>) -> Self
pub fn nested_region(key: impl Into<String>) -> Self
pub fn port_rail(key: impl Into<String>) -> Self
pub fn config_group(key: impl Into<String>) -> Self
pub fn metric_badge(key: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_order(self, order: i32) -> Self
pub fn with_anchor(self, anchor: impl Into<String>) -> Self
pub fn with_lane(self, lane: impl Into<String>) -> Self
pub fn with_slot(self, slot: impl Into<String>) -> Self
pub fn with_renderer_key(self, renderer_key: impl Into<String>) -> Self
pub fn with_icon_key(self, icon_key: impl Into<String>) -> Self
pub fn with_visibility(self, visibility: NodeSurfaceSlotVisibility) -> Self
pub fn with_control(self, control: NodeControlDescriptor) -> Self
pub fn with_controls( self, controls: impl IntoIterator<Item = NodeControlDescriptor>, ) -> Self
pub fn collapsed(self) -> Self
pub fn key_tail(&self) -> Option<&str>
pub fn data_key(&self) -> Option<&str>
pub fn display_label(&self) -> Option<&str>
pub fn order_key(&self) -> i32
pub fn is_visible(&self) -> bool
pub fn is_collapsed(&self) -> bool
Trait Implementations§
Source§impl Clone for NodeSurfaceSlotDescriptor
impl Clone for NodeSurfaceSlotDescriptor
Source§fn clone(&self) -> NodeSurfaceSlotDescriptor
fn clone(&self) -> NodeSurfaceSlotDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NodeSurfaceSlotDescriptor
impl Debug for NodeSurfaceSlotDescriptor
Source§impl<'de> Deserialize<'de> for NodeSurfaceSlotDescriptor
impl<'de> Deserialize<'de> for NodeSurfaceSlotDescriptor
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 PartialEq for NodeSurfaceSlotDescriptor
impl PartialEq for NodeSurfaceSlotDescriptor
Source§fn eq(&self, other: &NodeSurfaceSlotDescriptor) -> bool
fn eq(&self, other: &NodeSurfaceSlotDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NodeSurfaceSlotDescriptor
Auto Trait Implementations§
impl Freeze for NodeSurfaceSlotDescriptor
impl RefUnwindSafe for NodeSurfaceSlotDescriptor
impl Send for NodeSurfaceSlotDescriptor
impl Sync for NodeSurfaceSlotDescriptor
impl Unpin for NodeSurfaceSlotDescriptor
impl UnsafeUnpin for NodeSurfaceSlotDescriptor
impl UnwindSafe for NodeSurfaceSlotDescriptor
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