(deserializer: D)
| 18 | } |
| 19 | } |
| 20 | |
| 21 | fn deserialize_bytes_from_base64<'de, D>(deserializer: D) -> Result<Bytes, D::Error> |
| 22 | where |
| 23 | D: Deserializer<'de>, |
| 24 | { |
| 25 | let opt: Option<String> = Option::deserialize(deserializer)?; |
| 26 | match opt { |
| 27 | Some(s) => STANDARD |
| 28 | .decode(&s) |
| 29 | .map(Bytes::from) |
| 30 | .map_err(serde::de::Error::custom), |
| 31 | None => Ok(Bytes::new()), |
| 32 | } |
nothing calls this directly
no outgoing calls
no test coverage detected