Struct clingo::Configuration
[−]
[src]
pub struct Configuration(_);
Handle for to the solver configuration.
Methods
impl Configuration
[src]
pub fn root(&self) -> Option<Id>
[src]
Get the root key of the configuration.
pub fn configuration_type(&self, Id: Id) -> Option<ConfigurationType>
[src]
Get the type of a key. The type is a bitset, an entry can have multiple (but at least one) type.
pub fn description(&self, Id: Id) -> Result<&str, WrapperError>
[src]
Get the description of an entry.
pub fn array_size(&self, Id: Id) -> Option<usize>
[src]
Get the size of an array entry.
Pre-condition
The type of the entry must be ConfigurationType::ARRAY
.
pub fn array_at(&self, Id: Id, offset: usize) -> Option<Id>
[src]
Get the subkey at the given offset of an array entry.
Note: Some array entries, like fore example the solver configuration, can be accessed past there actual size to add subentries.
Pre-condition
The type of the entry must be ConfigurationType::ARRAY
.
Arguments
key
- the keyoffset
- the offset in the array
pub fn map_size(&self, Id: Id) -> Option<usize>
[src]
Get the number of subkeys of a map entry.
Pre-condition
The type of the entry must be ConfigurationType::MAP
.
pub fn map_has_subkey(&self, Id: Id, name: &str) -> Option<bool>
[src]
Query whether the map has a key.
Pre-condition
The type of the entry must be ConfigurationType::Map
.
Note: Multiple levels can be looked up by concatenating keys with a period.
Arguments
key
- the keyname
- the name to lookup the subkey
Returns whether the key is in the map
pub fn map_subkey_name(
&self,
Id: Id,
offset: usize
) -> Result<&str, WrapperError>
[src]
&self,
Id: Id,
offset: usize
) -> Result<&str, WrapperError>
Get the name associated with the offset-th subkey.
Pre-condition
The type of the entry must be ConfigurationType::MAP
.
Arguments
key
- the keyoffset
- the offset of the name
pub fn map_at(&self, Id: Id, name: &str) -> Option<Id>
[src]
Lookup a subkey under the given name.
Pre-condition
The type of the entry must be ConfigurationType::MAP
.
Note: Multiple levels can be looked up by concatenating keys with a period.
pub fn value_is_assigned(&self, Id: Id) -> Option<bool>
[src]
Check whether a entry has a value.
Pre-condition
The type of the entry must be ConfigurationType::VALUE
.
Arguments
key
- the key
pub fn value_get(&self, Id: Id) -> Result<&str, Error>
[src]
Get the string value of the given entry.
Pre-condition
The type of the entry must be ConfigurationType::VALUE
.
Arguments
key
- the key
Errors
pub fn value_set(&mut self, Id: Id, value: &str) -> Result<(), Error>
[src]
Set the value of an entry.
Pre-condition
The type of the entry must be ConfigurationType::VALUE
.
Arguments
key
- the keyvalue
- the value to set
Errors
NulError
- ifvalue
contains a nul byteWrapperError
Trait Implementations
impl Debug for Configuration
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for Configuration
[src]
impl Clone for Configuration
[src]
fn clone(&self) -> Configuration
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more