pub struct InboundMessage {
pub platform: String,
pub chat_id: String,
pub user_id: String,
pub message_id: String,
pub sent_at: DateTime<Utc>,
pub text: String,
pub reply_ctx: ReplyCtx,
}Expand description
A message received from a platform, normalized to the shape the bridge
understands. Fields beyond text/reply_ctx exist to let the bridge
enforce security policy (allow-list, dedup) generically across every
platform adapter, without knowing platform-specific wire formats.
Fields§
§platform: StringPlatform name (matches Platform::name), e.g. "telegram".
chat_id: StringPlatform-scoped chat identifier.
user_id: StringPlatform-scoped sender identifier (checked against allow_from).
message_id: StringPlatform-scoped, per-platform-unique message id used for dedup (e.g.
Telegram’s update_id, stringified).
sent_at: DateTime<Utc>When the platform says the message was sent — used to drop stale backlog delivered right after a restart (older than process start).
text: StringMessage text.
reply_ctx: ReplyCtxOpaque context to hand back to Platform::reply/edit.
Trait Implementations§
Source§impl Clone for InboundMessage
impl Clone for InboundMessage
Source§fn clone(&self) -> InboundMessage
fn clone(&self) -> InboundMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InboundMessage
impl RefUnwindSafe for InboundMessage
impl Send for InboundMessage
impl Sync for InboundMessage
impl Unpin for InboundMessage
impl UnsafeUnpin for InboundMessage
impl UnwindSafe for InboundMessage
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