#[non_exhaustive]pub enum MsgContent {
Text {
text: String,
undocumented: BTreeMap<String, JsonObject>,
},
Link {
text: String,
preview: LinkPreview,
undocumented: BTreeMap<String, JsonObject>,
},
Image {
text: String,
image: String,
undocumented: BTreeMap<String, JsonObject>,
},
Video {
text: String,
image: String,
duration: i32,
undocumented: BTreeMap<String, JsonObject>,
},
Voice {
text: String,
duration: i32,
undocumented: BTreeMap<String, JsonObject>,
},
File {
text: String,
undocumented: BTreeMap<String, JsonObject>,
},
Report {
text: String,
reason: ReportReason,
undocumented: BTreeMap<String, JsonObject>,
},
Chat {
text: String,
chat_link: MsgChatLink,
undocumented: BTreeMap<String, JsonObject>,
},
Unknown {
tag: String,
text: String,
json: JsonObject,
undocumented: BTreeMap<String, JsonObject>,
},
Undocumented(BTreeMap<String, JsonObject>),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
Source§impl Clone for MsgContent
impl Clone for MsgContent
Source§fn clone(&self) -> MsgContent
fn clone(&self) -> MsgContent
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 MsgContent
impl Debug for MsgContent
Source§impl<'de> Deserialize<'de> for MsgContent
impl<'de> Deserialize<'de> for MsgContent
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 MsgContent
impl PartialEq for MsgContent
Source§impl Serialize for MsgContent
impl Serialize for MsgContent
impl StructuralPartialEq for MsgContent
Auto Trait Implementations§
impl Freeze for MsgContent
impl RefUnwindSafe for MsgContent
impl Send for MsgContent
impl Sync for MsgContent
impl Unpin for MsgContent
impl UnwindSafe for MsgContent
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