Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/constraint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ impl Constraint {
self.name = Some(name);
self
}

/// The expression that is constrained to be null or negative
pub fn expression(&self) -> &Expression {
&self.expression
}

/// if is_equality, represents expression == 0, otherwise, expression <= 0
pub fn is_equality(&self) -> bool {
self.is_equality
}

/// get the constraint name, if it exists.
pub fn name(&self) -> Option<&str> {
self.name.as_deref()
}
}

impl FormatWithVars for Constraint {
Expand Down
Loading