Implement more persistency logic

This commit is contained in:
2019-05-03 11:19:34 +02:00
parent f5dcd52454
commit 96c2864a07
4 changed files with 84 additions and 33 deletions

View File

@ -3,6 +3,8 @@
#![allow(unused_variables)]
#![allow(dead_code)]
use std::io;
mod sha256;
pub use sha256::Sha256;
@ -18,3 +20,14 @@ pub struct Texture {
pub resolution: (usize, usize),
pub texture_hash: Sha256,
}
pub enum ReplaceTextureStatus {
// Done.
Ok,
// Call Again With Texture Binary
NeedTextureData(Sha256),
// Name or id already in use
Conflict,
}