pub struct Variable<Identifier = String> {
pub ty: Type,
pub domain: Option<Domain>,
pub value: Option<Literal<Identifier>>,
pub ann: Vec<Annotation<Identifier>>,
pub defined: bool,
pub introduced: bool,
}Expand description
The definition of a decision variable
Fields§
§ty: TypeThe type of the decision variable
domain: Option<Domain>The set of potential values from which the decision variable must take its value in a solution
If domain has the value None, then all values of the decision variable’s
Type are allowed in a solution.
value: Option<Literal<Identifier>>The “right hand side” of the variable, i.e., its value or alias to another variable
ann: Vec<Annotation<Identifier>>A list of annotations
defined: boolThis field is set to true when there is a constraint that has been marked as
defining this variable.
introduced: boolThis field is set to true when the variable has been introduced by the
MiniZinc compiler, rather than being explicitly defined at the top-level
of the MiniZinc model.
Trait Implementations§
Source§impl<'de, Identifier> Deserialize<'de> for Variable<Identifier>where
Identifier: Deserialize<'de> + Default,
impl<'de, Identifier> Deserialize<'de> for Variable<Identifier>where
Identifier: Deserialize<'de> + Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<Identifier> StructuralPartialEq for Variable<Identifier>
Auto Trait Implementations§
impl<Identifier> Freeze for Variable<Identifier>where
Identifier: Freeze,
impl<Identifier> RefUnwindSafe for Variable<Identifier>where
Identifier: RefUnwindSafe,
impl<Identifier> Send for Variable<Identifier>where
Identifier: Send,
impl<Identifier> Sync for Variable<Identifier>where
Identifier: Sync,
impl<Identifier> Unpin for Variable<Identifier>where
Identifier: Unpin,
impl<Identifier> UnwindSafe for Variable<Identifier>where
Identifier: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more