pub struct SlackAppContextEntity {
pub entity_type: SlackAppContextEntityType,
pub value: String,
pub team_id: Option<SlackTeamId>,
}Fields§
§entity_type: SlackAppContextEntityTypee.g. slack#/types/channel_id
value: String§team_id: Option<SlackTeamId>Implementations§
Source§impl SlackAppContextEntity
impl SlackAppContextEntity
Sourcepub fn new(entity_type: SlackAppContextEntityType, value: String) -> Self
pub fn new(entity_type: SlackAppContextEntityType, value: String) -> Self
Creates a new SlackAppContextEntity from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn entity_type(&mut self, value: SlackAppContextEntityType) -> &mut Self
pub fn entity_type(&mut self, value: SlackAppContextEntityType) -> &mut Self
Sets entity_type to value.
e.g. slack#/types/channel_id
Sourcepub fn with_entity_type(self, value: SlackAppContextEntityType) -> Self
pub fn with_entity_type(self, value: SlackAppContextEntityType) -> Self
Returns self with entity_type set to value.
e.g. slack#/types/channel_id
Sourcepub fn with_value(self, value: String) -> Self
pub fn with_value(self, value: String) -> Self
Returns self with value set to value.
Sourcepub fn team_id(&mut self, value: SlackTeamId) -> &mut Self
pub fn team_id(&mut self, value: SlackTeamId) -> &mut Self
Sets team_id to Some(value).
Sourcepub fn reset_team_id(&mut self) -> &mut Self
pub fn reset_team_id(&mut self) -> &mut Self
Sets team_id to None.
Sourcepub fn mopt_team_id(&mut self, value: Option<SlackTeamId>) -> &mut Self
pub fn mopt_team_id(&mut self, value: Option<SlackTeamId>) -> &mut Self
Sets team_id to the given Option.
Sourcepub fn with_team_id(self, value: SlackTeamId) -> Self
pub fn with_team_id(self, value: SlackTeamId) -> Self
Returns self with team_id set to Some(value).
Sourcepub fn without_team_id(self) -> Self
pub fn without_team_id(self) -> Self
Returns self with team_id set to None.
Sourcepub fn opt_team_id(self, value: Option<SlackTeamId>) -> Self
pub fn opt_team_id(self, value: Option<SlackTeamId>) -> Self
Returns self with team_id set to the given Option.
Trait Implementations§
Source§impl Clone for SlackAppContextEntity
impl Clone for SlackAppContextEntity
Source§impl Debug for SlackAppContextEntity
impl Debug for SlackAppContextEntity
Source§impl<'de> Deserialize<'de> for SlackAppContextEntity
impl<'de> Deserialize<'de> for SlackAppContextEntity
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<SlackAppContextEntityInit> for SlackAppContextEntity
impl From<SlackAppContextEntityInit> for SlackAppContextEntity
Source§fn from(value: SlackAppContextEntityInit) -> Self
fn from(value: SlackAppContextEntityInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackAppContextEntity
impl PartialEq for SlackAppContextEntity
Source§impl Serialize for SlackAppContextEntity
impl Serialize for SlackAppContextEntity
impl StructuralPartialEq for SlackAppContextEntity
Auto Trait Implementations§
impl Freeze for SlackAppContextEntity
impl RefUnwindSafe for SlackAppContextEntity
impl Send for SlackAppContextEntity
impl Sync for SlackAppContextEntity
impl Unpin for SlackAppContextEntity
impl UnsafeUnpin for SlackAppContextEntity
impl UnwindSafe for SlackAppContextEntity
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