implement serde (se, de) thingy for sha256, textureformat, texture

This commit is contained in:
2019-04-23 16:28:28 +02:00
parent a6d8b0a057
commit 84efffb6c7
4 changed files with 145 additions and 7 deletions

View File

@ -3,8 +3,13 @@
#![allow(unused_variables)]
#![allow(dead_code)]
pub struct Sha256(pub [u8; 64]);
mod sha256;
pub use sha256::Sha256;
mod texture_format;
pub use texture_format::TextureFormat;
#[derive(Eq, PartialEq, Clone, Serialize, Deserialize, Debug)]
pub struct Texture {
pub id: String,
pub name: String,
@ -13,8 +18,3 @@ pub struct Texture {
pub resolution: (usize, usize),
pub texture_hash: Sha256,
}
pub enum TextureFormat {
PNG,
JPEG,
}