Hi, is there a way to make this fn fully generic? I've tried number of approaches, including implementing my own FromBytes for new_type but alas... failed...
fn from_bytes_hlpr<T: std::convert::From<i32/*here ideally I'd like to provide just some generic integer type*/>>() -> T {
let mut buf = [0; 4];<< here instead of 4 I'd like to have size of the T
let fr_bytes = i32::from_be_bytes(buf);<< here instead of i32 I'd like to use T
fr_bytes.into()
}