pub struct NodeControlDescriptor {
pub key: String,
pub kind: NodeControlKind,
pub label: Option<String>,
pub binding: Option<NodeControlBinding>,
pub options: Vec<NodeControlOption>,
pub option_source: NodeControlOptionSource,
pub validation: NodeControlValidation,
pub presentation: NodeControlPresentation,
pub editability: NodeControlEditability,
pub order: Option<i32>,
pub anchor: Option<String>,
pub slot: Option<String>,
}Expand description
Renderer-neutral metadata for one adapter-local editable control.
Fields§
§key: String§kind: NodeControlKind§label: Option<String>§binding: Option<NodeControlBinding>§options: Vec<NodeControlOption>§option_source: NodeControlOptionSource§validation: NodeControlValidation§presentation: NodeControlPresentation§editability: NodeControlEditability§order: Option<i32>§anchor: Option<String>§slot: Option<String>Implementations§
Source§impl NodeControlDescriptor
impl NodeControlDescriptor
pub fn new(key: impl Into<String>, kind: NodeControlKind) -> Self
pub fn text_input(key: impl Into<String>) -> Self
pub fn number_input(key: impl Into<String>) -> Self
pub fn select(key: impl Into<String>) -> Self
pub fn multi_select(key: impl Into<String>) -> Self
pub fn toggle(key: impl Into<String>) -> Self
pub fn code(key: impl Into<String>) -> Self
pub fn color(key: impl Into<String>) -> Self
pub fn asset(key: impl Into<String>) -> Self
pub fn variable_picker(key: impl Into<String>) -> Self
pub fn expression(key: impl Into<String>) -> Self
pub fn text_area(key: impl Into<String>) -> Self
pub fn slider(key: impl Into<String>) -> Self
pub fn port_binding(key: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_binding(self, binding: NodeControlBinding) -> Self
pub fn with_option(self, option: NodeControlOption) -> Self
pub fn with_options( self, options: impl IntoIterator<Item = NodeControlOption>, ) -> Self
pub fn with_option_source(self, option_source: NodeControlOptionSource) -> Self
pub fn with_validation(self, validation: NodeControlValidation) -> Self
pub fn with_validation_rule(self, rule: NodeControlValidationRule) -> Self
pub fn required(self) -> Self
pub fn with_presentation(self, presentation: NodeControlPresentation) -> Self
pub fn with_placeholder(self, placeholder: impl Into<String>) -> Self
pub fn with_help_text(self, help_text: impl Into<String>) -> Self
pub fn with_language(self, language: impl Into<String>) -> Self
pub fn with_editability(self, editability: NodeControlEditability) -> Self
pub fn read_only(self) -> Self
pub fn disabled(self, reason: impl Into<String>) -> Self
pub fn secret(self) -> Self
pub fn with_order(self, order: i32) -> Self
pub fn with_anchor(self, anchor: impl Into<String>) -> Self
pub fn with_slot(self, slot: impl Into<String>) -> Self
pub fn data_key(&self) -> Option<&str>
pub fn display_label(&self) -> Option<&str>
pub fn order_key(&self) -> i32
Trait Implementations§
Source§impl Clone for NodeControlDescriptor
impl Clone for NodeControlDescriptor
Source§fn clone(&self) -> NodeControlDescriptor
fn clone(&self) -> NodeControlDescriptor
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 NodeControlDescriptor
impl Debug for NodeControlDescriptor
Source§impl<'de> Deserialize<'de> for NodeControlDescriptor
impl<'de> Deserialize<'de> for NodeControlDescriptor
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 NodeControlDescriptor
impl PartialEq for NodeControlDescriptor
Source§fn eq(&self, other: &NodeControlDescriptor) -> bool
fn eq(&self, other: &NodeControlDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NodeControlDescriptor
impl Serialize for NodeControlDescriptor
impl StructuralPartialEq for NodeControlDescriptor
Auto Trait Implementations§
impl Freeze for NodeControlDescriptor
impl RefUnwindSafe for NodeControlDescriptor
impl Send for NodeControlDescriptor
impl Sync for NodeControlDescriptor
impl Unpin for NodeControlDescriptor
impl UnsafeUnpin for NodeControlDescriptor
impl UnwindSafe for NodeControlDescriptor
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