pub struct ActionItem {
pub label: String,
pub action: Action,
pub destructive: bool,
pub variant: Option<ButtonVariant>,
pub icon: Option<String>,
pub visible_if: Option<String>,
}Expand description
A single action in an ActionGroup’s ordered item list.
Inline items (non-destructive, within max_inline) render as buttons.
The destructive flag forces the item into the overflow kebab and renders
it last regardless of its position in items.
visible_if is a fail-closed row gate (same semantics as
DropdownMenuAction.visible_if): when set, the item is hidden unless
row[field] is truthy. An absent or falsy field hides the item — a typo
in the field name cannot leak an action.
Fields§
§label: String§action: Action§destructive: boolWhen true, this item is forced into the overflow kebab and rendered last,
regardless of position in items. Does not count toward max_inline.
variant: Option<ButtonVariant>§icon: Option<String>§visible_if: Option<String>Fail-closed row gate (same semantics as DropdownMenuAction.visible_if).
When set, the item is only shown when row[visible_if] is truthy.
Absent/falsy field hides the item.
Trait Implementations§
Source§impl Clone for ActionItem
impl Clone for ActionItem
Source§fn clone(&self) -> ActionItem
fn clone(&self) -> ActionItem
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ActionItem
impl Debug for ActionItem
Source§impl<'de> Deserialize<'de> for ActionItem
impl<'de> Deserialize<'de> for ActionItem
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>,
Source§impl JsonSchema for ActionItem
impl JsonSchema for ActionItem
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ActionItem
impl PartialEq for ActionItem
Source§fn eq(&self, other: &ActionItem) -> bool
fn eq(&self, other: &ActionItem) -> bool
self and other values to be equal, and is used by ==.