#[non_exhaustive]pub enum MsgContent {
Text {
text: String,
undocumented: BTreeMap<String, Value>,
},
Link {
text: String,
preview: LinkPreview,
undocumented: BTreeMap<String, Value>,
},
Image {
text: String,
image: String,
undocumented: BTreeMap<String, Value>,
},
Video {
text: String,
image: String,
duration: i32,
undocumented: BTreeMap<String, Value>,
},
Voice {
text: String,
duration: i32,
undocumented: BTreeMap<String, Value>,
},
File {
text: String,
undocumented: BTreeMap<String, Value>,
},
Report {
text: String,
reason: ReportReason,
undocumented: BTreeMap<String, Value>,
},
Chat {
text: String,
chat_link: MsgChatLink,
undocumented: BTreeMap<String, Value>,
},
Unknown {
tag: String,
text: String,
json: Value,
undocumented: BTreeMap<String, Value>,
},
Undocumented(BTreeMap<String, Value>),
}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<MsgContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MsgContent, <__D as Deserializer<'de>>::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
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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