pub struct MultiSelectMenuUsers { /* private fields */ }Expand description
Multi select menu of user 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_users | Vec<String> | No | N/A |
| confirm | ConfirmationDialog | No | N/A |
| max_selected_items | i64 | No | Min value 1 |
| 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::MultiSelectMenuUsers;
let menu = MultiSelectMenuUsers::builder()
.action_id("text1234")
.placeholder(plain_text!("Select users")?)
.build()?;
let expected = serde_json::json!({
"type": "multi_users_select",
"action_id": "text1234",
"placeholder": {
"type": "plain_text",
"text": "Select users"
}
});
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 = MultiSelectMenuUsers::builder()
.action_id("text1234")
.placeholder(plain_text!("Select users")?)
.max_selected_items(0)
.build();
assert!(menu.is_err());Implementations§
Source§impl MultiSelectMenuUsers
impl MultiSelectMenuUsers
Sourcepub fn builder() -> MultiSelectMenuUsersBuilder
pub fn builder() -> MultiSelectMenuUsersBuilder
constract MultiSelectMenuUsersBuilder object.
Trait Implementations§
Source§impl Clone for MultiSelectMenuUsers
impl Clone for MultiSelectMenuUsers
Source§fn clone(&self) -> MultiSelectMenuUsers
fn clone(&self) -> MultiSelectMenuUsers
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 MultiSelectMenuUsers
impl Debug for MultiSelectMenuUsers
Source§impl Default for MultiSelectMenuUsers
impl Default for MultiSelectMenuUsers
Source§fn default() -> MultiSelectMenuUsers
fn default() -> MultiSelectMenuUsers
Returns the “default value” for a type. Read more
Source§impl From<MultiSelectMenuUsers> for Accessory
impl From<MultiSelectMenuUsers> for Accessory
Source§fn from(value: MultiSelectMenuUsers) -> Self
fn from(value: MultiSelectMenuUsers) -> Self
Converts to this type from the input type.
Source§impl From<MultiSelectMenuUsers> for ActionsElement
impl From<MultiSelectMenuUsers> for ActionsElement
Source§fn from(value: MultiSelectMenuUsers) -> Self
fn from(value: MultiSelectMenuUsers) -> Self
Converts to this type from the input type.
Source§impl From<MultiSelectMenuUsers> for InputElement
impl From<MultiSelectMenuUsers> for InputElement
Source§fn from(value: MultiSelectMenuUsers) -> Self
fn from(value: MultiSelectMenuUsers) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MultiSelectMenuUsers
impl PartialEq for MultiSelectMenuUsers
Source§impl Serialize for MultiSelectMenuUsers
impl Serialize for MultiSelectMenuUsers
impl StructuralPartialEq for MultiSelectMenuUsers
Auto Trait Implementations§
impl Freeze for MultiSelectMenuUsers
impl RefUnwindSafe for MultiSelectMenuUsers
impl Send for MultiSelectMenuUsers
impl Sync for MultiSelectMenuUsers
impl Unpin for MultiSelectMenuUsers
impl UnwindSafe for MultiSelectMenuUsers
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)