#[non_exhaustive]pub enum SurfaceNode {
Section {
title: Option<String>,
header_action_ids: Vec<InteractionId>,
children: Vec<SurfaceNode>,
},
TextBlock {
text: String,
},
KeyValue {
data_source_id: DataSourceId,
},
Table {
data_source_id: DataSourceId,
columns: Vec<SurfaceTableColumn>,
row_actions: Vec<SurfaceTableRowAction>,
},
Form {
interaction_id: InteractionId,
http_method: Option<InteractionHttpMethod>,
},
ActionBar {
action_ids: Vec<ActionRef>,
},
Tabs {
tabs: Vec<SurfaceTab>,
},
Callout {
level: CalloutLevel,
text: String,
},
EmptyState {
title: String,
description: Option<String>,
},
ModalTrigger {
interaction_id: InteractionId,
http_method: Option<InteractionHttpMethod>,
modal_nodes: Vec<SurfaceNode>,
},
WorkflowTrigger {
interaction_id: InteractionId,
step_nodes: Vec<SurfaceNode>,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Section
TextBlock
KeyValue
Fields
§
data_source_id: DataSourceIdTable
Fields
§
data_source_id: DataSourceId§
columns: Vec<SurfaceTableColumn>§
row_actions: Vec<SurfaceTableRowAction>Form
ActionBar
Tabs
Fields
§
tabs: Vec<SurfaceTab>Callout
EmptyState
ModalTrigger
Fields
§
interaction_id: InteractionId§
http_method: Option<InteractionHttpMethod>§
modal_nodes: Vec<SurfaceNode>WorkflowTrigger
Implementations§
Source§impl SurfaceNode
impl SurfaceNode
Sourcepub fn section(
title: Option<impl Into<String>>,
children: Vec<SurfaceNode>,
) -> SurfaceNode
pub fn section( title: Option<impl Into<String>>, children: Vec<SurfaceNode>, ) -> SurfaceNode
Constructs a SurfaceNode::Section with an optional title and children,
and no header action buttons.
Use this constructor instead of the struct literal because SurfaceNode is
#[non_exhaustive] — external crates cannot construct variants directly.
Sourcepub fn section_with_header_actions(
title: Option<impl Into<String>>,
header_action_ids: Vec<InteractionId>,
children: Vec<SurfaceNode>,
) -> SurfaceNode
pub fn section_with_header_actions( title: Option<impl Into<String>>, header_action_ids: Vec<InteractionId>, children: Vec<SurfaceNode>, ) -> SurfaceNode
Constructs a SurfaceNode::Section with an optional title, header action
button IDs, and children.
header_action_ids refers to crate::InteractionIds that the Dashboard
renders as icon buttons in the section header row.
Use this constructor instead of the struct literal because SurfaceNode is
#[non_exhaustive] — external crates cannot construct variants directly.
Trait Implementations§
Source§impl Clone for SurfaceNode
impl Clone for SurfaceNode
Source§fn clone(&self) -> SurfaceNode
fn clone(&self) -> SurfaceNode
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 SurfaceNode
impl Debug for SurfaceNode
Source§impl<'de> Deserialize<'de> for SurfaceNode
impl<'de> Deserialize<'de> for SurfaceNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SurfaceNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SurfaceNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SurfaceNode
Source§impl PartialEq for SurfaceNode
impl PartialEq for SurfaceNode
Source§impl Serialize for SurfaceNode
impl Serialize for SurfaceNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SurfaceNode
Auto Trait Implementations§
impl Freeze for SurfaceNode
impl RefUnwindSafe for SurfaceNode
impl Send for SurfaceNode
impl Sync for SurfaceNode
impl Unpin for SurfaceNode
impl UnsafeUnpin for SurfaceNode
impl UnwindSafe for SurfaceNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.