pub struct DirectMessageUpdatedPayload {
pub event_time: String,
pub message: Message,
}Expand description
DIRECT_MESSAGE_UPDATEDペイロード
Example
use traq_bot_http::payloads::DirectMessageUpdatedPayload;
let payload = r##"{
"eventTime": "2019-05-08T13:36:09.421492525Z",
"message": {
"id": "2d7ff3f5-c313-4f4a-a9bb-0b5f84d2b6f8",
"user": {
"id": "dfdff0c9-5de0-46ee-9721-2525e8bb3d45",
"name": "takashi_trap",
"displayName": "寺田 健二",
"iconId": "2bc06cda-bdb9-4a68-8000-62f907f36a92",
"bot": false
},
"channelId": "c5a5a697-3bad-4540-b2da-93dc88181d34",
"text": "!{\"type\": \"user\", \"raw\": \"@takashi_trap\", \"id\": \"dfdff0c9-5de0-46ee-9721-2525e8bb3d45\"} こんにちは",
"plainText": "@takashi_trap こんにちは",
"embedded": [
{
"raw": "@takashi_trap",
"type": "user",
"id": "dfdff0c9-5de0-46ee-9721-2525e8bb3d45"
}
],
"createdAt": "2019-05-08T13:36:09.365393261Z",
"updatedAt": "2019-05-08T13:36:09.365393261Z"
}
}"##;
let payload = serde_json::from_str::<DirectMessageUpdatedPayload>(payload).unwrap();
println!("{payload:?}");Fields§
§event_time: String§message: MessageTrait Implementations§
source§impl Clone for DirectMessageUpdatedPayload
impl Clone for DirectMessageUpdatedPayload
source§fn clone(&self) -> DirectMessageUpdatedPayload
fn clone(&self) -> DirectMessageUpdatedPayload
Returns a copy 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 DirectMessageUpdatedPayload
impl Debug for DirectMessageUpdatedPayload
source§impl<'de> Deserialize<'de> for DirectMessageUpdatedPayload
impl<'de> Deserialize<'de> for DirectMessageUpdatedPayload
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<DirectMessageUpdatedPayload> for DirectMessageUpdatedPayload
impl PartialEq<DirectMessageUpdatedPayload> for DirectMessageUpdatedPayload
source§fn eq(&self, other: &DirectMessageUpdatedPayload) -> bool
fn eq(&self, other: &DirectMessageUpdatedPayload) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for DirectMessageUpdatedPayload
impl StructuralEq for DirectMessageUpdatedPayload
impl StructuralPartialEq for DirectMessageUpdatedPayload
Auto Trait Implementations§
impl RefUnwindSafe for DirectMessageUpdatedPayload
impl Send for DirectMessageUpdatedPayload
impl Sync for DirectMessageUpdatedPayload
impl Unpin for DirectMessageUpdatedPayload
impl UnwindSafe for DirectMessageUpdatedPayload
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