pub struct SlackMessageSender {
pub user: Option<SlackUserId>,
pub bot_id: Option<SlackBotId>,
pub username: Option<String>,
pub display_as_bot: Option<bool>,
pub user_profile: Option<SlackUserProfile>,
pub bot_profile: Option<SlackBotInfo>,
}Fields§
§user: Option<SlackUserId>§bot_id: Option<SlackBotId>§username: Option<String>§display_as_bot: Option<bool>§user_profile: Option<SlackUserProfile>§bot_profile: Option<SlackBotInfo>Implementations§
Source§impl SlackMessageSender
impl SlackMessageSender
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new SlackMessageSender from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn user(&mut self, value: SlackUserId) -> &mut Self
pub fn user(&mut self, value: SlackUserId) -> &mut Self
Sets user to Some(value).
Sourcepub fn reset_user(&mut self) -> &mut Self
pub fn reset_user(&mut self) -> &mut Self
Sets user to None.
Sourcepub fn mopt_user(&mut self, value: Option<SlackUserId>) -> &mut Self
pub fn mopt_user(&mut self, value: Option<SlackUserId>) -> &mut Self
Sets user to the given Option.
Sourcepub fn with_user(self, value: SlackUserId) -> Self
pub fn with_user(self, value: SlackUserId) -> Self
Returns self with user set to Some(value).
Sourcepub fn without_user(self) -> Self
pub fn without_user(self) -> Self
Returns self with user set to None.
Sourcepub fn opt_user(self, value: Option<SlackUserId>) -> Self
pub fn opt_user(self, value: Option<SlackUserId>) -> Self
Returns self with user set to the given Option.
Sourcepub fn bot_id(&mut self, value: SlackBotId) -> &mut Self
pub fn bot_id(&mut self, value: SlackBotId) -> &mut Self
Sets bot_id to Some(value).
Sourcepub fn reset_bot_id(&mut self) -> &mut Self
pub fn reset_bot_id(&mut self) -> &mut Self
Sets bot_id to None.
Sourcepub fn mopt_bot_id(&mut self, value: Option<SlackBotId>) -> &mut Self
pub fn mopt_bot_id(&mut self, value: Option<SlackBotId>) -> &mut Self
Sets bot_id to the given Option.
Sourcepub fn with_bot_id(self, value: SlackBotId) -> Self
pub fn with_bot_id(self, value: SlackBotId) -> Self
Returns self with bot_id set to Some(value).
Sourcepub fn without_bot_id(self) -> Self
pub fn without_bot_id(self) -> Self
Returns self with bot_id set to None.
Sourcepub fn opt_bot_id(self, value: Option<SlackBotId>) -> Self
pub fn opt_bot_id(self, value: Option<SlackBotId>) -> Self
Returns self with bot_id set to the given Option.
Sourcepub fn reset_username(&mut self) -> &mut Self
pub fn reset_username(&mut self) -> &mut Self
Sets username to None.
Sourcepub fn mopt_username(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_username(&mut self, value: Option<String>) -> &mut Self
Sets username to the given Option.
Sourcepub fn with_username(self, value: String) -> Self
pub fn with_username(self, value: String) -> Self
Returns self with username set to Some(value).
Sourcepub fn without_username(self) -> Self
pub fn without_username(self) -> Self
Returns self with username set to None.
Sourcepub fn opt_username(self, value: Option<String>) -> Self
pub fn opt_username(self, value: Option<String>) -> Self
Returns self with username set to the given Option.
Sourcepub fn display_as_bot(&mut self, value: bool) -> &mut Self
pub fn display_as_bot(&mut self, value: bool) -> &mut Self
Sets display_as_bot to Some(value).
Sourcepub fn reset_display_as_bot(&mut self) -> &mut Self
pub fn reset_display_as_bot(&mut self) -> &mut Self
Sets display_as_bot to None.
Sourcepub fn mopt_display_as_bot(&mut self, value: Option<bool>) -> &mut Self
pub fn mopt_display_as_bot(&mut self, value: Option<bool>) -> &mut Self
Sets display_as_bot to the given Option.
Sourcepub fn with_display_as_bot(self, value: bool) -> Self
pub fn with_display_as_bot(self, value: bool) -> Self
Returns self with display_as_bot set to Some(value).
Sourcepub fn without_display_as_bot(self) -> Self
pub fn without_display_as_bot(self) -> Self
Returns self with display_as_bot set to None.
Sourcepub fn opt_display_as_bot(self, value: Option<bool>) -> Self
pub fn opt_display_as_bot(self, value: Option<bool>) -> Self
Returns self with display_as_bot set to the given Option.
Sourcepub fn user_profile(&mut self, value: SlackUserProfile) -> &mut Self
pub fn user_profile(&mut self, value: SlackUserProfile) -> &mut Self
Sets user_profile to Some(value).
Sourcepub fn reset_user_profile(&mut self) -> &mut Self
pub fn reset_user_profile(&mut self) -> &mut Self
Sets user_profile to None.
Sourcepub fn mopt_user_profile(
&mut self,
value: Option<SlackUserProfile>,
) -> &mut Self
pub fn mopt_user_profile( &mut self, value: Option<SlackUserProfile>, ) -> &mut Self
Sets user_profile to the given Option.
Sourcepub fn with_user_profile(self, value: SlackUserProfile) -> Self
pub fn with_user_profile(self, value: SlackUserProfile) -> Self
Returns self with user_profile set to Some(value).
Sourcepub fn without_user_profile(self) -> Self
pub fn without_user_profile(self) -> Self
Returns self with user_profile set to None.
Sourcepub fn opt_user_profile(self, value: Option<SlackUserProfile>) -> Self
pub fn opt_user_profile(self, value: Option<SlackUserProfile>) -> Self
Returns self with user_profile set to the given Option.
Sourcepub fn bot_profile(&mut self, value: SlackBotInfo) -> &mut Self
pub fn bot_profile(&mut self, value: SlackBotInfo) -> &mut Self
Sets bot_profile to Some(value).
Sourcepub fn reset_bot_profile(&mut self) -> &mut Self
pub fn reset_bot_profile(&mut self) -> &mut Self
Sets bot_profile to None.
Sourcepub fn mopt_bot_profile(&mut self, value: Option<SlackBotInfo>) -> &mut Self
pub fn mopt_bot_profile(&mut self, value: Option<SlackBotInfo>) -> &mut Self
Sets bot_profile to the given Option.
Sourcepub fn with_bot_profile(self, value: SlackBotInfo) -> Self
pub fn with_bot_profile(self, value: SlackBotInfo) -> Self
Returns self with bot_profile set to Some(value).
Sourcepub fn without_bot_profile(self) -> Self
pub fn without_bot_profile(self) -> Self
Returns self with bot_profile set to None.
Sourcepub fn opt_bot_profile(self, value: Option<SlackBotInfo>) -> Self
pub fn opt_bot_profile(self, value: Option<SlackBotInfo>) -> Self
Returns self with bot_profile set to the given Option.