[][src]Struct ritual_build::Config

pub struct Config { /* fields omitted */ }

Configuration of the build script.

Methods

impl Config[src]

pub fn new() -> Result<Self>[src]

Constructs default configuration state based on information in the generated build_script_data.json file located at the crate root. The caller may change CppBuildPaths and CppBuildConfig values stored in this object and call config.run() to apply them.

pub fn set_current_cpp_library_version(&mut self, version: Option<String>)[src]

pub fn known_targets(&self) -> &[LibraryTarget][src]

Returns version of the native C++ library used for generating this crate. This is the value set with Config::set_cpp_lib_version during generation, or None if the version was not set.

pub fn cpp_build_config(&self) -> &CppBuildConfig[src]

Returns current CppBuildConfig data.

pub fn cpp_build_config_mut(&mut self) -> &mut CppBuildConfig[src]

Returns mutable CppBuildConfig data.

pub fn set_cpp_build_config(&mut self, config: CppBuildConfig)[src]

Sets new CppBuildConfig data.

pub fn cpp_build_paths(&self) -> &CppBuildPaths[src]

Returns current CppBuildPaths data.

pub fn cpp_build_paths_mut(&mut self) -> &mut CppBuildPaths[src]

Returns mutable CppBuildPaths data.

pub fn set_cpp_build_paths(&mut self, config: CppBuildPaths)[src]

Sets new CppBuildPaths data.

pub fn try_run(self) -> Result<()>[src]

Same as run(), but result of the operation is returned to the caller.

pub fn run(self) -> ![src]

Starts build script with current configuration. The build script performs the following operations:

  • Build the C++ wrapper library;
  • Generate ffi.rs file with actual link attributes;
  • Determine C++ type sizes on current platform and generate sized_types.rs;
  • Report linking information to cargo.

This function ends the process with the appropriate error code and never returns to the caller.

Trait Implementations

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