(deserializer: D)
| 504 | |
| 505 | impl<'de> Deserialize<'de> for BinaryProfile { |
| 506 | fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> |
| 507 | where |
| 508 | D: Deserializer<'de>, |
| 509 | { |
| 510 | #[derive(Deserialize)] |
| 511 | #[serde(untagged)] |
| 512 | enum BinaryProfileInput { |
| 513 | Path(String), |
| 514 | Object(BinaryProfileObject), |
| 515 | } |
| 516 | |
| 517 | #[derive(Deserialize)] |
| 518 | struct BinaryProfileObject { |
| 519 | path: String, |
| 520 | #[serde(default)] |
| 521 | harness: bool, |
| 522 | } |
| 523 | |
| 524 | match BinaryProfileInput::deserialize(deserializer)? { |
| 525 | BinaryProfileInput::Path(path) => Ok(Self { |
| 526 | path, |
| 527 | harness: false, |
| 528 | }), |
| 529 | BinaryProfileInput::Object(binary) => Ok(Self { |
| 530 | path: binary.path, |
| 531 | harness: binary.harness, |
| 532 | }), |
| 533 | } |
| 534 | } |
| 535 | } |
| 536 | |
| 537 | fn default_category() -> ProviderProfileCategory { |
nothing calls this directly
no outgoing calls
no test coverage detected