tfhe_versionable/
upgrade.rs

1//! How to perform conversion from one version to the next.
2
3/// This trait should be implemented for each version of the original type that is not the current
4/// one. The upgrade method is called in chains until we get to the last version of the type.
5pub trait Upgrade<T> {
6    type Error: std::error::Error + Send + Sync + 'static;
7    fn upgrade(self) -> Result<T, Self::Error>;
8}