pub struct MessageEvent {
pub type: Option<String>,
pub source: Option<Box<Source>>,
pub timestamp: i64,
pub mode: EventMode,
pub webhook_event_id: String,
pub delivery_context: Box<DeliveryContext>,
pub reply_token: Option<String>,
pub message: Box<MessageContent>,
}Expand description
MessageEvent : Webhook event object which contains the sent message.
Fields§
§type: Option<String>Type of the event
source: Option<Box<Source>>§timestamp: i64Time of the event in milliseconds.
mode: EventMode§webhook_event_id: StringWebhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format.
delivery_context: Box<DeliveryContext>§reply_token: Option<String>§message: Box<MessageContent>Implementations§
Source§impl MessageEvent
impl MessageEvent
Sourcepub fn new(
type: String,
timestamp: i64,
mode: EventMode,
webhook_event_id: String,
delivery_context: DeliveryContext,
message: MessageContent,
) -> MessageEvent
pub fn new( type: String, timestamp: i64, mode: EventMode, webhook_event_id: String, delivery_context: DeliveryContext, message: MessageContent, ) -> MessageEvent
Webhook event object which contains the sent message.
Trait Implementations§
Source§impl Clone for MessageEvent
impl Clone for MessageEvent
Source§fn clone(&self) -> MessageEvent
fn clone(&self) -> MessageEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageEvent
impl Debug for MessageEvent
Source§impl Default for MessageEvent
impl Default for MessageEvent
Source§fn default() -> MessageEvent
fn default() -> MessageEvent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MessageEvent
impl<'de> Deserialize<'de> for MessageEvent
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 PartialEq for MessageEvent
impl PartialEq for MessageEvent
Source§impl Serialize for MessageEvent
impl Serialize for MessageEvent
impl StructuralPartialEq for MessageEvent
Auto Trait Implementations§
impl Freeze for MessageEvent
impl RefUnwindSafe for MessageEvent
impl Send for MessageEvent
impl Sync for MessageEvent
impl Unpin for MessageEvent
impl UnwindSafe for MessageEvent
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