pub fn parse_from_cargo(cargo_toml_str: &str) -> Result<Option<(Self, BTreeSet<String>)>> {
        let cargo_toml: toml::Value = toml::from_str(cargo_toml_str)?;
        let cross_metadata_opt = cargo_toml
            .get("package")
            .and_then(|p| p.get("metadata"))
            .and_then(|m| m.get("cross"));

        if let Some(cross_meta) = cross_metadata_opt {
            Ok(Some(Self::parse_from_deserializer(cross_meta.clone())?))
        } else {
            Ok(None)
        }
    }
/// Parses the [`CrossToml`] from a string containing the Cargo.toml contents
Parses the [`CrossToml`] from a string containing the Cargo.toml contents
Parses the [ ` CrossToml ` ] from a string containing the Cargo . toml contents
pub fn parse_from_cargo(cargo_toml_str: &str) -> Result<Option<(Self, BTreeSet<String>)>> {
        let cargo_toml: toml::Value = toml::from_str(cargo_toml_str)?;
        let cross_metadata_opt = cargo_toml
            .get("package")
            .and_then(|p| p.get("metadata"))
            .and_then(|m| m.get("cross"));
        if let Some(cross_meta) = cross_metadata_opt {
            Ok(Some(Self::parse_from_deserializer(cross_meta.clone())?))
        } else {
            Ok(None)
        }
    }
pub fn parse_from_cargo ( cargo_toml_str : & str ) -> Result < Option < ( Self , BTreeSet < String > ) > > { let cargo_toml : toml :: Value = toml :: from_str ( cargo_toml_str ) ? ; let cross_metadata_opt = cargo_toml . get ( " " ) . and_then ( | p | p . get ( " " ) ) . and_then ( | m | m . get ( " " ) ) ; if let Some ( cross_meta ) = cross_metadata_opt { Ok ( Some ( Self :: parse_from_deserializer ( cross_meta . clone ( ) ) ? ) ) } else { Ok ( None ) } }
Parses the [`CrossToml`] from a string containing the Cargo.toml contents
Parses the [ ` CrossToml ` ] from a string containing the Cargo . toml contents
cargo_toml_str
&str
cargo_toml_str
&str