InferenceLabel

Trait InferenceLabel 

Source
pub trait InferenceLabel {
    // Required method
    fn to_str(&self) -> Arc<str>;
}
Expand description

A label of the inference mechanism that identifies a particular inference. It is combined with a ConstraintTag to create an InferenceCode.

There may be different inference algorithms for the same contraint that are incomparable in terms of propagation strength. To discriminate between these algorithms, the inference label is used.

Conceptually, the inference label is a string. To aid with auto-complete, we introduce this as a strongly-typed concept. For most cases, creating an inference label is done with the declare_inference_label macro.

Required Methods§

Source

fn to_str(&self) -> Arc<str>

Returns the string-representation of the inference label.

Typically different instances of the same propagator will use the same inference label. Users are encouraged to share the string allocation, which is why the return value is Arc<str>.

Implementors§