pub struct SlackMessageMetadata {
pub event_type: String,
pub event_payload: Option<HashMap<String, String>>,
}Fields§
§event_type: String§event_payload: Option<HashMap<String, String>>Implementations§
Source§impl SlackMessageMetadata
impl SlackMessageMetadata
Sourcepub fn new(event_type: String) -> Self
pub fn new(event_type: String) -> Self
Creates a new SlackMessageMetadata from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn event_type(&mut self, value: String) -> &mut Self
pub fn event_type(&mut self, value: String) -> &mut Self
Sets event_type to value.
Sourcepub fn with_event_type(self, value: String) -> Self
pub fn with_event_type(self, value: String) -> Self
Returns self with event_type set to value.
Sourcepub fn event_payload(&mut self, value: HashMap<String, String>) -> &mut Self
pub fn event_payload(&mut self, value: HashMap<String, String>) -> &mut Self
Sets event_payload to Some(value).
Sourcepub fn reset_event_payload(&mut self) -> &mut Self
pub fn reset_event_payload(&mut self) -> &mut Self
Sets event_payload to None.
Sourcepub fn mopt_event_payload(
&mut self,
value: Option<HashMap<String, String>>,
) -> &mut Self
pub fn mopt_event_payload( &mut self, value: Option<HashMap<String, String>>, ) -> &mut Self
Sets event_payload to the given Option.
Sourcepub fn with_event_payload(self, value: HashMap<String, String>) -> Self
pub fn with_event_payload(self, value: HashMap<String, String>) -> Self
Returns self with event_payload set to Some(value).
Sourcepub fn without_event_payload(self) -> Self
pub fn without_event_payload(self) -> Self
Returns self with event_payload set to None.
Trait Implementations§
Source§impl Clone for SlackMessageMetadata
impl Clone for SlackMessageMetadata
Source§impl Debug for SlackMessageMetadata
impl Debug for SlackMessageMetadata
Source§impl<'de> Deserialize<'de> for SlackMessageMetadata
impl<'de> Deserialize<'de> for SlackMessageMetadata
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<SlackMessageMetadataInit> for SlackMessageMetadata
impl From<SlackMessageMetadataInit> for SlackMessageMetadata
Source§fn from(value: SlackMessageMetadataInit) -> Self
fn from(value: SlackMessageMetadataInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackMessageMetadata
impl PartialEq for SlackMessageMetadata
Source§impl Serialize for SlackMessageMetadata
impl Serialize for SlackMessageMetadata
impl StructuralPartialEq for SlackMessageMetadata
Auto Trait Implementations§
impl Freeze for SlackMessageMetadata
impl RefUnwindSafe for SlackMessageMetadata
impl Send for SlackMessageMetadata
impl Sync for SlackMessageMetadata
impl Unpin for SlackMessageMetadata
impl UnsafeUnpin for SlackMessageMetadata
impl UnwindSafe for SlackMessageMetadata
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