pub struct Violation<Task> {
pub path: Vec<Task>,
pub added: Task,
pub task: Task,
pub before: Option<u64>,
pub after: Option<u64>,
}Expand description
A counterexample to diminishing marginal gains: adding added to path raised the gain
of task.
Fields§
§path: Vec<Task>The path before added was inserted, in execution order.
added: TaskThe task whose insertion raised the gain of task.
task: TaskThe task whose gain went up.
before: Option<u64>The gain of task on path; None when it was infeasible.
after: Option<u64>The gain of task once added is in the path; None when it is infeasible.
Trait Implementations§
impl<Task: Eq> Eq for Violation<Task>
Source§impl<Task: Debug> Error for Violation<Task>
impl<Task: Debug> Error for Violation<Task>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl<Task: PartialEq> StructuralPartialEq for Violation<Task>
Auto Trait Implementations§
impl<Task> Forget for Violation<Task>
impl<Task> Freeze for Violation<Task>
impl<Task> Move for Violation<Task>
impl<Task> RefUnwindSafe for Violation<Task>
impl<Task> Send for Violation<Task>
impl<Task> Sync for Violation<Task>
impl<Task> Unpin for Violation<Task>
impl<Task> UnsafeUnpin for Violation<Task>
impl<Task> UnwindSafe for Violation<Task>
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