pub struct StaticSelectElement {
pub action_id: Option<String>,
pub options: Vec<OptionObject>,
pub option_groups: Vec<OptionGroup>,
pub initial_option: Option<OptionObject>,
pub confirm: Option<ConfirmationDialog>,
pub focus_on_load: Option<bool>,
pub placeholder: Option<TextObject>,
/* private fields */
}Expand description
A select menu with static options (either options or option_groups). https://docs.slack.dev/reference/block-kit/block-elements/select-menu-element
Fields§
§action_id: Option<String>§options: Vec<OptionObject>§option_groups: Vec<OptionGroup>§initial_option: Option<OptionObject>§confirm: Option<ConfirmationDialog>§focus_on_load: Option<bool>§placeholder: Option<TextObject>Implementations§
Source§impl StaticSelectElement
impl StaticSelectElement
pub fn new(options: Vec<OptionObject>) -> Self
pub fn from_option_groups(option_groups: Vec<OptionGroup>) -> Self
pub fn action_id(self, action_id: impl Into<String>) -> Self
pub fn option_groups(self, option_groups: Vec<OptionGroup>) -> Self
pub fn initial_option(self, initial_option: OptionObject) -> Self
pub fn confirm(self, confirm: ConfirmationDialog) -> Self
pub fn focus_on_load(self, focus_on_load: bool) -> Self
pub fn placeholder(self, placeholder: impl Into<TextObject>) -> Self
Trait Implementations§
Source§impl Clone for StaticSelectElement
impl Clone for StaticSelectElement
Source§impl Debug for StaticSelectElement
impl Debug for StaticSelectElement
Source§impl<'de> Deserialize<'de> for StaticSelectElement
impl<'de> Deserialize<'de> for StaticSelectElement
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 From<StaticSelectElement> for ActionsElement
impl From<StaticSelectElement> for ActionsElement
Source§fn from(value: StaticSelectElement) -> Self
fn from(value: StaticSelectElement) -> Self
Converts to this type from the input type.
Source§impl From<StaticSelectElement> for SectionAccessory
impl From<StaticSelectElement> for SectionAccessory
Source§fn from(value: StaticSelectElement) -> Self
fn from(value: StaticSelectElement) -> Self
Converts to this type from the input type.
Source§impl From<StaticSelectElement> for InputElement
impl From<StaticSelectElement> for InputElement
Source§fn from(value: StaticSelectElement) -> Self
fn from(value: StaticSelectElement) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StaticSelectElement
impl PartialEq for StaticSelectElement
Source§impl Serialize for StaticSelectElement
impl Serialize for StaticSelectElement
impl StructuralPartialEq for StaticSelectElement
Auto Trait Implementations§
impl Freeze for StaticSelectElement
impl RefUnwindSafe for StaticSelectElement
impl Send for StaticSelectElement
impl Sync for StaticSelectElement
impl Unpin for StaticSelectElement
impl UnsafeUnpin for StaticSelectElement
impl UnwindSafe for StaticSelectElement
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