#[non_exhaustive]pub struct SurfaceContextSelectorDescriptor {
pub param_key: String,
pub label: String,
pub all_option_label: String,
pub rest_api_path: String,
pub value_field: String,
pub label_field: String,
pub required_for_interactions: Vec<InteractionId>,
}Expand description
Describes a context-selector dropdown rendered above a surface’s content.
When present on a SurfaceDescriptor, SurfaceReadPanel fetches the
options from rest_api_path and renders a ProviderSelector above the
surface content. The selected value is merged into baseParams under
param_key, driving both the table data load and optional interaction gates.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.param_key: StringParam key injected into baseParams when a specific option is selected.
label: StringLabel shown above the selector dropdown.
all_option_label: StringLabel for the “show all” option (no param injected).
rest_api_path: StringREST API path returning a JSON array or paginated items list.
value_field: StringField in each item used as the option value.
label_field: StringField in each item used as the option label.
required_for_interactions: Vec<InteractionId>Interaction IDs disabled (with tooltip) when no specific option is selected.
Implementations§
Source§impl SurfaceContextSelectorDescriptor
impl SurfaceContextSelectorDescriptor
Sourcepub fn new(
param_key: impl Into<String>,
label: impl Into<String>,
all_option_label: impl Into<String>,
rest_api_path: impl Into<String>,
value_field: impl Into<String>,
label_field: impl Into<String>,
required_for_interactions: Vec<InteractionId>,
) -> SurfaceContextSelectorDescriptor
pub fn new( param_key: impl Into<String>, label: impl Into<String>, all_option_label: impl Into<String>, rest_api_path: impl Into<String>, value_field: impl Into<String>, label_field: impl Into<String>, required_for_interactions: Vec<InteractionId>, ) -> SurfaceContextSelectorDescriptor
Constructs a new SurfaceContextSelectorDescriptor.
Required because the struct is #[non_exhaustive] — external crates cannot use
struct literal syntax and must call this constructor instead.
Trait Implementations§
Source§impl Clone for SurfaceContextSelectorDescriptor
impl Clone for SurfaceContextSelectorDescriptor
Source§fn clone(&self) -> SurfaceContextSelectorDescriptor
fn clone(&self) -> SurfaceContextSelectorDescriptor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for SurfaceContextSelectorDescriptor
impl<'de> Deserialize<'de> for SurfaceContextSelectorDescriptor
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SurfaceContextSelectorDescriptor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SurfaceContextSelectorDescriptor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SurfaceContextSelectorDescriptor
impl PartialEq for SurfaceContextSelectorDescriptor
Source§fn eq(&self, other: &SurfaceContextSelectorDescriptor) -> bool
fn eq(&self, other: &SurfaceContextSelectorDescriptor) -> bool
self and other values to be equal, and is used by ==.