yog_event/media.rs
1//! Media as the game takes it: a `.yog`'s yimage handed to the game as PNG
2//! (`yog_media::yimage`; the runtime answers).
3
4use yog_data::with::Raw;
5
6/// The PNG of a yimage.
7#[derive(Debug, Clone, yog_data::Schema)]
8pub struct Png {
9 #[data(with = "Raw")]
10 pub yimage: Vec<u8>,
11}
12
13/// A PNG's bytes (none: not a yimage).
14#[derive(Debug, Clone, Default, yog_data::Schema)]
15pub struct PngBytes {
16 #[data(with = "Raw")]
17 pub png: Vec<u8>,
18}