pub struct DropdownMenuAction {
pub label: String,
pub action: Action,
pub destructive: bool,
pub visible_if: Option<String>,
}Expand description
A single action item in a dropdown menu.
Fields§
§label: String§action: Action§destructive: bool§visible_if: Option<String>When set, this item is only emitted in a DataTable row when the row’s
visible_if field is truthy (true / non-zero number / non-empty string /
non-empty array or object). An absent or falsy field hides the item —
fail-closed so a typo in the view spec cannot leak an action onto every
row. Outside DataTable contexts (e.g. standalone DropdownMenu element)
the field is ignored.
Trait Implementations§
Source§impl Clone for DropdownMenuAction
impl Clone for DropdownMenuAction
Source§fn clone(&self) -> DropdownMenuAction
fn clone(&self) -> DropdownMenuAction
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 DropdownMenuAction
impl Debug for DropdownMenuAction
Source§impl<'de> Deserialize<'de> for DropdownMenuAction
impl<'de> Deserialize<'de> for DropdownMenuAction
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 JsonSchema for DropdownMenuAction
impl JsonSchema for DropdownMenuAction
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for DropdownMenuAction
impl PartialEq for DropdownMenuAction
Source§fn eq(&self, other: &DropdownMenuAction) -> bool
fn eq(&self, other: &DropdownMenuAction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DropdownMenuAction
impl Serialize for DropdownMenuAction
impl StructuralPartialEq for DropdownMenuAction
Auto Trait Implementations§
impl Freeze for DropdownMenuAction
impl RefUnwindSafe for DropdownMenuAction
impl Send for DropdownMenuAction
impl Sync for DropdownMenuAction
impl Unpin for DropdownMenuAction
impl UnsafeUnpin for DropdownMenuAction
impl UnwindSafe for DropdownMenuAction
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