Last active
October 1, 2021 05:16
-
-
Save ntakouris/a1b9ea2d5f89ef879a976d23b453c829 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use serde::{Serialize, Deserialize}; | |
#[derive(Serialize, Deserialize, Clone, Debug)] | |
pub struct CaptionedImagePayload { | |
pub caption: String, | |
pub blob_storage_ref_id: String | |
} | |
#[derive(Serialize, Deserialize, Clone, Debug)] | |
pub enum DataResourcePayload { | |
String(String), | |
Float(f32), | |
Int(i32), | |
Bool(bool), | |
CaptionedImage(CaptionedImagePayload) | |
} | |
#[derive(Serialize, Deserialize, Clone, Debug)] | |
pub struct DataResource { | |
// whatever other metadata you need | |
pub id: String, | |
pub value: DataResourcePayload | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment