pub struct DmEvent {
pub id: String,
pub text: Option<String>,
pub event_type: Option<String>,
pub created_at: Option<String>,
pub dm_conversation_id: Option<String>,
pub sender_id: Option<String>,
pub extra: BTreeMap<String, Value>,
}Expand description
A direct message event from the X API v2.
Fields§
§id: StringEvent identifier.
text: Option<String>Message body, for text events.
event_type: Option<String>Event kind (e.g. "MessageCreate", "ParticipantsJoin").
created_at: Option<String>ISO-8601 timestamp the event occurred.
dm_conversation_id: Option<String>Conversation the event belongs to.
sender_id: Option<String>Sender’s user ID.
extra: BTreeMap<String, Value>Forward-compatibility bucket — captures unknown event fields.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DmEvent
impl<'de> Deserialize<'de> for DmEvent
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 JsonSchema for DmEvent
impl JsonSchema for DmEvent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for DmEvent
impl RefUnwindSafe for DmEvent
impl Send for DmEvent
impl Sync for DmEvent
impl Unpin for DmEvent
impl UnsafeUnpin for DmEvent
impl UnwindSafe for DmEvent
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