1
2
3
4
5
6
7
8
9
10
11
12
13
use std::error::Error;

/// implement this trait to mark something as serializable into a row of a positional file
pub trait ToPositionalRow {
    fn to_positional_row(&self) -> String;
}

/// implement this trait to mark something as parsable from a row of a positional file
pub trait FromPositionalRow {
    fn from_positional_row(row: impl ToString) -> Result<Self, Box<dyn Error>>
    where
        Self: Sized;
}