Skip to main content

NodeSurfaceSlotDescriptor

Struct NodeSurfaceSlotDescriptor 

Source
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: String

Stable slot key within the node kind, such as header.main or field.primary_key.

§kind: NodeSurfaceSlotKind

Semantic 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

Source

pub fn new(key: impl Into<String>, kind: NodeSurfaceSlotKind) -> Self

Source

pub fn header(key: impl Into<String>) -> Self

Source

pub fn body(key: impl Into<String>) -> Self

Source

pub fn footer(key: impl Into<String>) -> Self

Source

pub fn badge(key: impl Into<String>) -> Self

Source

pub fn icon(key: impl Into<String>) -> Self

Source

pub fn field_row(key: impl Into<String>) -> Self

Source

pub fn action_row(key: impl Into<String>) -> Self

Source

pub fn preview(key: impl Into<String>) -> Self

Source

pub fn nested_region(key: impl Into<String>) -> Self

Source

pub fn status_banner(key: impl Into<String>) -> Self

Source

pub fn port_rail(key: impl Into<String>) -> Self

Source

pub fn config_group(key: impl Into<String>) -> Self

Source

pub fn metric_badge(key: impl Into<String>) -> Self

Source

pub fn with_label(self, label: impl Into<String>) -> Self

Source

pub fn with_order(self, order: i32) -> Self

Source

pub fn with_anchor(self, anchor: impl Into<String>) -> Self

Source

pub fn with_lane(self, lane: impl Into<String>) -> Self

Source

pub fn with_slot(self, slot: impl Into<String>) -> Self

Source

pub fn with_renderer_key(self, renderer_key: impl Into<String>) -> Self

Source

pub fn with_icon_key(self, icon_key: impl Into<String>) -> Self

Source

pub fn with_visibility(self, visibility: NodeSurfaceSlotVisibility) -> Self

Source

pub fn with_control(self, control: NodeControlDescriptor) -> Self

Source

pub fn with_controls( self, controls: impl IntoIterator<Item = NodeControlDescriptor>, ) -> Self

Source

pub fn hidden(self) -> Self

Source

pub fn collapsed(self) -> Self

Source

pub fn key_tail(&self) -> Option<&str>

Source

pub fn data_key(&self) -> Option<&str>

Source

pub fn display_label(&self) -> Option<&str>

Source

pub fn order_key(&self) -> i32

Source

pub fn is_visible(&self) -> bool

Source

pub fn is_hidden(&self) -> bool

Source

pub fn is_collapsed(&self) -> bool

Source

pub fn is_hidden_or_collapsed(&self) -> bool

Trait Implementations§

Source§

impl Clone for NodeSurfaceSlotDescriptor

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeSurfaceSlotDescriptor

Source§

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

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

impl<'de> Deserialize<'de> for NodeSurfaceSlotDescriptor

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 NodeSurfaceSlotDescriptor

Source§

fn eq(&self, other: &NodeSurfaceSlotDescriptor) -> 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 NodeSurfaceSlotDescriptor

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 NodeSurfaceSlotDescriptor

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.