[][src]Struct system_deps::Config

pub struct Config { /* fields omitted */ }

Structure used to configure metadata before starting to probe for dependencies

Implementations

impl Config[src]

pub fn new() -> Self[src]

Create a new set of configuration

pub fn probe(self) -> Result<HashMap<String, Library>, Error>[src]

Probe all libraries configured in the Cargo.toml [package.metadata.system-deps] section.

pub fn add_build_internal<F>(self, name: &str, func: F) -> Self where
    F: 'static + FnOnce(&str, &str) -> Result<Library, BuildInternalClosureError>, 
[src]

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 in Cargo.toml
  • func: closure called when internally building the library. It receives as argument the library name and the minimum version required.

Trait Implementations

impl Default for Config[src]

Auto Trait Implementations

impl !RefUnwindSafe for Config

impl !Send for Config

impl !Sync for Config

impl Unpin for Config

impl !UnwindSafe for Config

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.