diff --git a/src/module/mod.rs b/src/module/mod.rs index f935997b..c0d8f110 100644 --- a/src/module/mod.rs +++ b/src/module/mod.rs @@ -86,36 +86,32 @@ pub mod file { } } - pub mod header { + pub enum FileHeaderSpec { + Null, + Bool, + Integer, + UInteger, + Float, + Text, + Key { name: String, value_type: Box }, + Array { allowed_types: Box> }, + } - pub enum FileHeaderSpec { - Null, - Bool, - Integer, - UInteger, - Float, - Text, - Key { name: String, value_type: Box }, - Array { allowed_types: Box> }, - } - - pub enum FileHeaderData { - Null, - Bool(bool), - Integer(i64), - UInteger(u64), - Float(f64), - Text(String), - Key { name: String, value: Box }, - Array { values: Box> }, - } - - pub trait FileHeaderParser : Sized { - fn new(spec: &FileHeaderSpec) -> Self; - fn read(&self, string: &String) -> Result; - fn write(&self, data: &FileHeaderData) -> Result; - } + pub enum FileHeaderData { + Null, + Bool(bool), + Integer(i64), + UInteger(u64), + Float(f64), + Text(String), + Key { name: String, value: Box }, + Array { values: Box> }, + } + pub trait FileHeaderParser : Sized { + fn new(spec: &FileHeaderSpec) -> Self; + fn read(&self, string: &String) -> Result; + fn write(&self, data: &FileHeaderData) -> Result; } pub trait FileData : Sized {