trait DefinesStaticIntervalOrder<T>: Display + IntervalOrderwhere
T: HasAssociatedIntervals,{
// Required methods
fn get_intervals<'a>(
&'a self,
var: &T,
) -> Result<&'a Vec<Interval>, IntervalOrderError<T>>;
fn get_interval_index(
&self,
var: &T,
i: &Interval,
) -> Result<usize, IntervalOrderError<T>>;
fn get_interval_by_index<'a>(
&'a self,
var: &T,
idx: usize,
) -> Result<&'a Interval, IntervalOrderError<T>>;
fn check_interval_replaced_by_eq(
&self,
ib: IntervalBoundary,
) -> IntervalBoundary;
}Expand description
Types implementing this trait define a static order on intervals that associates every interval with an index for each variable
Required Methods§
fn get_intervals<'a>( &'a self, var: &T, ) -> Result<&'a Vec<Interval>, IntervalOrderError<T>>
fn get_interval_index( &self, var: &T, i: &Interval, ) -> Result<usize, IntervalOrderError<T>>
fn get_interval_by_index<'a>( &'a self, var: &T, idx: usize, ) -> Result<&'a Interval, IntervalOrderError<T>>
Sourcefn check_interval_replaced_by_eq(
&self,
ib: IntervalBoundary,
) -> IntervalBoundary
fn check_interval_replaced_by_eq( &self, ib: IntervalBoundary, ) -> IntervalBoundary
Check whether the interval order replaces the interval boundary
This method checks if the interval boundary ib is replaced by the
interval order. If the interval boundary is replaced, the method returns
the new interval boundary that replaces ib. If the interval boundary
is not replaced, the method returns the original interval boundary.
An interval might have been replaced if the interval boundary is considered equal to another boundary in the order.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.