pub struct InboundEvent {
pub event_id: String,
pub conversation: ConversationKey,
pub author: UserRef,
pub text: String,
pub attachments: Vec<Attachment>,
pub mentions_bot: bool,
pub is_direct: bool,
pub restricted: bool,
pub message_id: Option<MessageId>,
pub sent_at: Timestamp,
}Expand description
A message received from a platform, normalized by its channel adapter.
Fields§
§event_id: StringPlatform event or message id, used to drop duplicate deliveries.
conversation: ConversationKeyThe conversation it belongs to.
Who wrote it.
text: StringThe text, with mentions of the bot removed and other mentions written as @name.
attachments: Vec<Attachment>Media sent with the message.
mentions_bot: boolThe bot was mentioned (or replied to, on platforms that only deliver such group messages).
is_direct: boolA one-to-one conversation with the bot.
restricted: boolThe platform withheld the content (for example Zalo’s message.unsupported.received for
protected users). The runtime answers with a fixed message and never calls an agent.
message_id: Option<MessageId>Platform message id, used to reply to this message where supported.
sent_at: TimestampWhen the platform says it was sent (or when it was received, if unknown).
Trait Implementations§
Source§impl Clone for InboundEvent
impl Clone for InboundEvent
Source§impl Debug for InboundEvent
impl Debug for InboundEvent
Source§impl<'de> Deserialize<'de> for InboundEvent
impl<'de> Deserialize<'de> for InboundEvent
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
impl Eq for InboundEvent
Source§impl PartialEq for InboundEvent
impl PartialEq for InboundEvent
Source§impl Serialize for InboundEvent
impl Serialize for InboundEvent
impl StructuralPartialEq for InboundEvent
Auto Trait Implementations§
impl Freeze for InboundEvent
impl RefUnwindSafe for InboundEvent
impl Send for InboundEvent
impl Sync for InboundEvent
impl Unpin for InboundEvent
impl UnsafeUnpin for InboundEvent
impl UnwindSafe for InboundEvent
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