pub struct LexOrder {
pub components: Vec<String>,
}Expand description
A combinator for building lexicographic well-founded orderings.
Fields§
§components: Vec<String>Component measure names in decreasing priority.
Implementations§
Source§impl LexOrder
impl LexOrder
Sourcepub fn new(components: Vec<impl Into<String>>) -> Self
pub fn new(components: Vec<impl Into<String>>) -> Self
Construct from a list of measure component names.
Sourcepub fn push(self, component: impl Into<String>) -> Self
pub fn push(self, component: impl Into<String>) -> Self
Add an additional (lowest-priority) component.
Sourcepub fn type_string(&self) -> String
pub fn type_string(&self) -> String
Describe the lex order as a tuple type string.
Sourcepub fn check_decrease(
&self,
values_before: &[u64],
values_after: &[u64],
) -> bool
pub fn check_decrease( &self, values_before: &[u64], values_after: &[u64], ) -> bool
Verify that a concrete sequence of (before, after) pairs is
lexicographically decreasing using the given values for each component.
values_before[i] and values_after[i] are u64 values of component i.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LexOrder
impl RefUnwindSafe for LexOrder
impl Send for LexOrder
impl Sync for LexOrder
impl Unpin for LexOrder
impl UnsafeUnpin for LexOrder
impl UnwindSafe for LexOrder
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