[−][src]Struct ritual_common::cpp_build_config::CppBuildConfig
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]
fn clone(&self) -> CppBuildConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CppBuildConfig
[src]
impl Default for CppBuildConfig
[src]
fn default() -> CppBuildConfig
[src]
impl<'de> Deserialize<'de> for CppBuildConfig
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for CppBuildConfig
[src]
Auto Trait Implementations
impl RefUnwindSafe for CppBuildConfig
impl Send for CppBuildConfig
impl Sync for CppBuildConfig
impl Unpin for CppBuildConfig
impl UnwindSafe for CppBuildConfig
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Inspect for T where
T: Debug,
[src]
T: Debug,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,