pub fn with_metadata(metadata: &impl Serialize) -> Result<Self, toml::ser::Error> {
        let toml_str = toml::to_string(metadata)?;
        let metadata =
            toml::from_str(&toml_str).expect("toml::to_string creates a valid TOML string");
        Ok(Self {
            metadata,
            ..Self::default()
        })
    }
Constructs a new summary with the provided metadata, and an empty `target_packages` and
`host_packages`.
guppy-summaries/src/summary.rs