Struct weld::WeldConf[][src]

pub struct WeldConf { /* fields omitted */ }

A struct used to configure compilation and the Weld runtime.

Methods

impl WeldConf
[src]

Creates a new empty WeldConf.

Weld configurations are unstructured key/value pairs. The configuration is used to modify how a Weld program is compiled (e.g., setting multi-thread support, configuring optimization passes, etc.) and how a Weld program is run (e.g., a memory limit, the number of threads to allocate the run, etc.).

Examples

use weld::WeldConf;

let conf = WeldConf::new();

Adds a configuration to this WeldConf.

This method does not perform any checks to ensure that the key/value pairs are valid. If a WeldConf contains an invalid configuration option, the WeldModule methods that compile and run modules will fail with an error.

Examples

use weld::WeldConf;

let mut conf = WeldConf::new();
conf.set("weld.memory.limit", "1024");

// Invalid key/value pairs are also allowed but may raise errors.
conf.set("weld.madeUpConfig", "madeUpValue");

Get the value of the given key, or None if it is not set.

Examples

 use weld::WeldConf;

 let mut conf = WeldConf::new();
 conf.set("weld.memory.limit", "1024");

 let value = conf.get("weld.memory.limit").unwrap().to_str().unwrap();
 assert_eq!(value, "1024");

 let value = conf.get("non-existant key");
 assert!(value.is_none());

Trait Implementations

impl Debug for WeldConf
[src]

Formats the value using the given formatter. Read more

impl Clone for WeldConf
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for WeldConf

impl Sync for WeldConf