1#[macro_export] 2macro_rules! try_into { 3 ($expr:expr, $target_type:ty) => { 4 TryInto::<$target_type>::try_into($expr).map_err(|_| anyhow::anyhow!("Type casting error")) 5 }; 6}