create skeleton for server from design
This commit is contained in:
44
server/texture-sync-server/src/server_state.rs
Normal file
44
server/texture-sync-server/src/server_state.rs
Normal 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!()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user