Out Traits here must implement the Sized trait
This commit is contained in:
parent
6fa42204cb
commit
647d5611c7
1 changed files with 3 additions and 3 deletions
|
@ -110,7 +110,7 @@ pub mod file {
|
|||
Array { values: Box<Vec<FileHeaderData>> },
|
||||
}
|
||||
|
||||
pub trait FileHeaderParser {
|
||||
pub trait FileHeaderParser : Sized {
|
||||
fn new(spec: &FileHeaderSpec) -> Self;
|
||||
fn read(&self, string: &String) -> Result<FileHeaderData, super::ParserError>;
|
||||
fn write(&self, data: &FileHeaderData) -> Result<String, super::ParserError>;
|
||||
|
@ -118,12 +118,12 @@ pub mod file {
|
|||
|
||||
}
|
||||
|
||||
pub trait FileData {
|
||||
pub trait FileData : Sized {
|
||||
fn get_fulltext(&self) -> String;
|
||||
fn get_abbrev(&self) -> String;
|
||||
}
|
||||
|
||||
pub trait FileDataParser {
|
||||
pub trait FileDataParser : Sized {
|
||||
fn new() -> FileDataParser;
|
||||
fn read(&self, string: String) -> FileData;
|
||||
fn write(&self, data: &FileData) -> Result<String, ParserError>;
|
||||
|
|
Loading…
Reference in a new issue