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) -> Self
pub fn add_build_internal<F>(self, name: &str, func: F) -> Self
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.toml
func
: closure called when internally building the library.
It receives as argument the library name, and the minimum version required.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl !RefUnwindSafe for Config
impl !Send for Config
impl !Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more