[][src]Struct pkg_config::Config

pub struct Config { /* fields omitted */ }

Methods

impl Config[src]

pub fn new() -> Config[src]

Creates a new set of configuration options which are all initially set to "blank".

pub fn statik(&mut self, statik: bool) -> &mut Config[src]

Indicate whether the --static flag should be passed.

This will override the inference from environment variables described in the crate documentation.

pub fn atleast_version(&mut self, vers: &str) -> &mut Config[src]

Indicate that the library must be at least version vers.

pub fn exactly_version(&mut self, vers: &str) -> &mut Config[src]

Indicate that the library must be equal to version vers.

pub fn range_version<'a, R>(&mut self, range: R) -> &mut Config where
    R: RangeBounds<&'a str>, 
[src]

Indicate that the library's version must be in range.

pub fn arg<S: AsRef<OsStr>>(&mut self, arg: S) -> &mut Config[src]

Add an argument to pass to pkg-config.

It's placed after all of the arguments generated by this library.

pub fn cargo_metadata(&mut self, cargo_metadata: bool) -> &mut Config[src]

Define whether metadata should be emitted for cargo allowing it to automatically link the binary. Defaults to true.

pub fn env_metadata(&mut self, env_metadata: bool) -> &mut Config[src]

Define whether metadata should be emitted for cargo allowing to automatically rebuild when environment variables change. Defaults to false.

pub fn print_system_libs(&mut self, print: bool) -> &mut Config[src]

Enable or disable the PKG_CONFIG_ALLOW_SYSTEM_LIBS environment variable.

This env var is enabled by default.

pub fn probe(&self, name: &str) -> Result<Library, Error>[src]

Run pkg-config to find the library name.

This will use all configuration previously set to specify how pkg-config is run.

pub fn target_supported(&self) -> bool[src]

Trait Implementations

impl Default for Config[src]

impl Clone for Config[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Sync for Config

impl Unpin for Config

impl Send for Config

impl UnwindSafe for Config

impl RefUnwindSafe for Config

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for 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.

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

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

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