[][src]Struct pkg_config::Config

pub struct Config { /* fields omitted */ }

Implementations

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 true.

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 print_system_cflags(&mut self, print: bool) -> &mut Config[src]

Enable or disable the PKG_CONFIG_ALLOW_SYSTEM_CFLAGS 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 Clone for Config[src]

impl Debug for Config[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.