[][src]Struct ritual_common::cpp_build_config::CppBuildConfig

pub struct CppBuildConfig { /* fields omitted */ }

Information required to build the C++ wrapper library on every supported platform. it contains list of linked libraries, frameworks, compiler types and selected type of C++ wrapper library (shared or static). Default value of this object is set before generation of the crate using ritual::config::Config::set_cpp_build_config or cpp_build_config_mut and intended to be cross-platform.

In order to allow target-dependent build configuration, multiple configurations can be added to one CppBuildConfig object, each with a condition. During evaluation, each configuration item will only be used if the associated condition is currently true. All properties from all matching configuration are combined.

If this conditional evaluation is not enough, a custom build script can modify this config during build script execution using ritual_build::Config::set_cpp_build_config or cpp_build_config_mut.

Methods

impl CppBuildConfig[src]

pub fn new() -> Self[src]

Create an empty configuration

pub fn add(&mut self, condition: Condition, data: CppBuildConfigData)[src]

Add data with condition.

pub fn eval(&self, target: &Target) -> Result<CppBuildConfigData>[src]

Select all conditions that are true on target, combine all corresponding configuration items and return the result.

Trait Implementations

impl Clone for CppBuildConfig[src]

impl Debug for CppBuildConfig[src]

impl Default for CppBuildConfig[src]

impl<'de> Deserialize<'de> for CppBuildConfig[src]

impl Serialize for CppBuildConfig[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

impl<T> Inspect for T where
    T: Debug
[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.