34 lines
481 B
Rust
34 lines
481 B
Rust
use std::io::Read;
|
|
|
|
pub mod file;
|
|
pub mod map;
|
|
pub mod bot;
|
|
pub mod demo;
|
|
|
|
pub enum Error{
|
|
Header(file::Error),
|
|
Map(map::Error),
|
|
Bot(bot::Error),
|
|
Demo(demo::Error),
|
|
}
|
|
|
|
pub enum SNF{
|
|
Map(map::StreamableMap),
|
|
Bot(bot::StreamableBot),
|
|
Demo(demo::StreamableDemo),
|
|
}
|
|
|
|
pub fn read<R:Read>(input:R)->Result<SNF,Error>{
|
|
//let header:file::Header=input.read()?;
|
|
Err(Error::Header(file::Error::InvalidMagic))
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
//use super::*;
|
|
|
|
#[test]
|
|
fn test() {
|
|
}
|
|
}
|