Struct system_deps::Config
source · pub struct Config { /* private fields */ }Expand description
Structure used to configure metadata before starting to probe for dependencies
Implementations§
source§impl Config
impl Config
sourcepub fn probe(self) -> Result<Dependencies, Error>
pub fn probe(self) -> Result<Dependencies, Error>
Probe all libraries configured in the Cargo.toml
[package.metadata.system-deps] section.
The returned hash is using the toml key defining the dependency as key.
sourcepub fn add_build_internal<F>(self, name: &str, func: F) -> Selfwhere
F: 'static + FnOnce(&str, &str) -> Result<Library, BuildInternalClosureError>,
pub fn add_build_internal<F>(self, name: &str, func: F) -> Selfwhere F: 'static + FnOnce(&str, &str) -> Result<Library, BuildInternalClosureError>,
Add hook so system-deps can internally build library name if requested by user.
It will only be triggered if the environment variable
SYSTEM_DEPS_$NAME_BUILD_INTERNAL is defined with either always or
auto as value. In the latter case, func is called only if the requested
version of the library was not found on the system.
Arguments
name: the name of the library, as defined inCargo.tomlfunc: closure called when internally building the library. It receives as argument the library name, and the minimum version required.