create skeleton for server from design

This commit is contained in:
2019-04-20 01:24:19 +02:00
parent 6f86302e06
commit 88fae2cba4
10 changed files with 277 additions and 245 deletions

View File

@ -0,0 +1,44 @@
// TODO: remove on implementation
#![allow(unused_imports)]
#![allow(unused_variables)]
#![allow(dead_code)]
use crate::model::*;
use crate::protocol::*;
use std::sync::Arc;
pub struct ServerState {
// ...
}
impl ProtocolHandler for ServerState {
fn query(&mut self, query: &[String]) -> ProtocolResult<Vec<Texture>> {
unimplemented!()
}
fn get_texture_by_id(&mut self, id: String) -> ProtocolResult<Option<Texture>> {
unimplemented!()
}
fn get_texture_by_name(&mut self, id: String) -> ProtocolResult<Option<Texture>> {
unimplemented!()
}
fn get_texture_file(&mut self, hash: Sha256) -> ProtocolResult<Arc<Vec<u8>>> {
unimplemented!()
}
fn get_texture_preview(&mut self, hash: Sha256) -> ProtocolResult<Arc<Vec<u8>>> {
unimplemented!()
}
fn replace_texture(
&mut self,
delete: Option<Texture>,
insert: Option<Texture>,
insert_texture_data: Option<Vec<u8>>,
) -> ProtocolResult<ReplaceTextureStatus> {
unimplemented!()
}
}