desmos_bindings/posts/
types.rs

1//! Contains the types definitions of x/posts.
2
3pub use crate::proto::desmos::posts::v3::*;
4
5use crate::cosmos_types::Any;
6
7/// Represents a generic attachment content.
8pub enum AttachmentContent {
9    /// Represents the poll content.
10    Poll(Poll),
11
12    /// Represents the media content.
13    Media(Media),
14}
15
16impl Into<Any> for AttachmentContent {
17    fn into(self) -> Any {
18        match self {
19            AttachmentContent::Poll(content) => content.into(),
20            AttachmentContent::Media(content) => content.into(),
21        }
22    }
23}