pub trait StateTransformer {
type Input: StateVersion + BorshDeserialize;
type Output: StateVersion + BorshSerialize;
type Error;
// Required method
fn transform(&self, input: Self::Input) -> Result<Self::Output, Self::Error>;
// Provided methods
fn input_version(&self) -> u32 { ... }
fn output_version(&self) -> u32 { ... }
fn run(&self) -> Result<Self::Output, MigrationError<Self::Error>> { ... }
}