#[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 (const: unstable) · 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>,
impl Eq for SurfaceContextSelectorDescriptor
Source§impl Serialize for SurfaceContextSelectorDescriptor
impl Serialize for SurfaceContextSelectorDescriptor
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,
impl StructuralPartialEq for SurfaceContextSelectorDescriptor
Auto Trait Implementations§
impl Freeze for SurfaceContextSelectorDescriptor
impl RefUnwindSafe for SurfaceContextSelectorDescriptor
impl Send for SurfaceContextSelectorDescriptor
impl Sync for SurfaceContextSelectorDescriptor
impl Unpin for SurfaceContextSelectorDescriptor
impl UnsafeUnpin for SurfaceContextSelectorDescriptor
impl UnwindSafe for SurfaceContextSelectorDescriptor
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
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
key and return true if they are equal.