1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#![allow(unused_variables)]

use crate::ledgerapi::state::State;

pub trait DataType: Default {
    /// Converts into a state that can be handled and put into
    /// the ledger and private collections
    fn to_state(&self) -> State;

    ///
    fn get_key(&self) -> String;

    ///
    fn build_from_state(state: State) -> Self;

    ///
    fn form_key(k: &String) -> String;
}