pub trait Law {
type Field: Copy;
type Condition: Copy;
type Admitted: Copy;
type Receipt;
type Exit;
type Error;
fn validate(field: Self::Field) -> std::result::Result<Self::Field, Self::Error>;
fn select(field: Self::Field) -> Self::Condition;
fn admit(field: Self::Field, condition: Self::Condition) -> Self::Admitted;
fn receipt(admitted: Self::Admitted, sequence: u64) -> Self::Receipt;
fn exit(receipt: Self::Receipt) -> Self::Exit;
}
pub trait TableLaw: Law<Field = u8> {
const VALID: [bool; 256];
const SELECT: [Self::Condition; 256];
const ADMIT: [fn(u8, Self::Condition) -> Self::Admitted; 256];
}