use std::convert::Into; use crate::persist::MinMaxJson; #[derive(Debug, Clone)] pub struct MinMax { pub max: T, pub min: T, } impl MinMax { #[inline] pub fn from_json>(other: MinMaxJson, _version: u64) -> Self { Self { max: other.max.into(), min: other.min.into(), } } } impl, Y> Into> for MinMax { #[inline] fn into(self) -> MinMaxJson { MinMaxJson { max: self.max.into(), min: self.min.into(), } } }