(self, v: &str)
| 105 | } |
| 106 | |
| 107 | fn visit_str<E>(self, v: &str) -> Result<Self::Value, E> |
| 108 | where |
| 109 | E: de::Error, |
| 110 | { |
| 111 | let v = v |
| 112 | .strip_prefix("0x") |
| 113 | .ok_or_else(|| E::custom("missing `0x` prefix"))?; |
| 114 | |
| 115 | if v.len() != 8 { |
| 116 | return Err(E::custom( |
| 117 | "hex string must be 8 characters after the `0x` prefix", |
| 118 | )); |
| 119 | } |
| 120 | |
| 121 | let val = u32::from_str_radix(v, 16).map_err(E::custom)?; |
| 122 | Ok(ExplicitTransactionID(val)) |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | impl<'de> Deserialize<'de> for ExplicitTransactionID { |
nothing calls this directly
no test coverage detected