pub struct MultiSelectMenuConversations { /* private fields */ }Expand description
Multi select menu of conversation list representation
§Fields and Validations
For more details, see the official documentation.
| Field | Type | Required | Validation |
|---|---|---|---|
| action_id | String | No | Max length 255 characters |
| initial_conversations | Vec<String> | No | N/A |
| default_to_current_conversation | bool | No | N/A |
| confirm | ConfirmationDialog | No | N/A |
| max_selected_items | i64 | No | Min value 1 |
| filter | ConversationFilter | No | N/A |
| focus_on_load | bool | No | N/A |
| placeholder | Text<Plain> | No | Max length 150 characters |
§Example
use slack_messaging::plain_text;
use slack_messaging::blocks::elements::MultiSelectMenuConversations;
let menu = MultiSelectMenuConversations::builder()
.action_id("text1234")
.placeholder(plain_text!("Select conversations")?)
.build()?;
let expected = serde_json::json!({
"type": "multi_conversations_select",
"action_id": "text1234",
"placeholder": {
"type": "plain_text",
"text": "Select conversations"
}
});
let json = serde_json::to_value(menu).unwrap();
assert_eq!(json, expected);
// If your object has any validation errors, the build method returns Result::Err
let menu = MultiSelectMenuConversations::builder()
.action_id("text1234")
.placeholder(plain_text!("Select conversations")?)
.max_selected_items(0)
.build();
assert!(menu.is_err());Implementations§
Source§impl MultiSelectMenuConversations
impl MultiSelectMenuConversations
Sourcepub fn builder() -> MultiSelectMenuConversationsBuilder
pub fn builder() -> MultiSelectMenuConversationsBuilder
constract MultiSelectMenuConversationsBuilder object.
Trait Implementations§
Source§impl Clone for MultiSelectMenuConversations
impl Clone for MultiSelectMenuConversations
Source§fn clone(&self) -> MultiSelectMenuConversations
fn clone(&self) -> MultiSelectMenuConversations
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MultiSelectMenuConversations
impl Debug for MultiSelectMenuConversations
Source§impl Default for MultiSelectMenuConversations
impl Default for MultiSelectMenuConversations
Source§fn default() -> MultiSelectMenuConversations
fn default() -> MultiSelectMenuConversations
Returns the “default value” for a type. Read more
Source§impl From<MultiSelectMenuConversations> for Accessory
impl From<MultiSelectMenuConversations> for Accessory
Source§fn from(value: MultiSelectMenuConversations) -> Self
fn from(value: MultiSelectMenuConversations) -> Self
Converts to this type from the input type.
Source§impl From<MultiSelectMenuConversations> for ActionsElement
impl From<MultiSelectMenuConversations> for ActionsElement
Source§fn from(value: MultiSelectMenuConversations) -> Self
fn from(value: MultiSelectMenuConversations) -> Self
Converts to this type from the input type.
Source§impl From<MultiSelectMenuConversations> for InputElement
impl From<MultiSelectMenuConversations> for InputElement
Source§fn from(value: MultiSelectMenuConversations) -> Self
fn from(value: MultiSelectMenuConversations) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for MultiSelectMenuConversations
Auto Trait Implementations§
impl Freeze for MultiSelectMenuConversations
impl RefUnwindSafe for MultiSelectMenuConversations
impl Send for MultiSelectMenuConversations
impl Sync for MultiSelectMenuConversations
impl Unpin for MultiSelectMenuConversations
impl UnwindSafe for MultiSelectMenuConversations
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)