tzf_rs/gen/
mod.rs

1use prost::Message;
2
3pub mod tzf {
4    pub mod v1 {
5        include!("tzf.v1.rs");
6    }
7}
8pub use tzf::v1::*;
9
10impl TryFrom<Vec<u8>> for Timezones {
11    type Error = anyhow::Error;
12
13    fn try_from(value: Vec<u8>) -> Result<Self, Self::Error> {
14        Ok(Self::decode(&value[..])?)
15    }
16}
17
18impl TryFrom<Vec<u8>> for PreindexTimezones {
19    type Error = anyhow::Error;
20
21    fn try_from(value: Vec<u8>) -> Result<Self, Self::Error> {
22        Ok(Self::decode(&value[..])?)
23    }
24}