pub struct Trace<Dim: Dimension> { /* private fields */ }Expand description
A trace of the steps taken to generate a schedule.
The trace can be queried for the schedule output of each generator and filter, and each generator and filter can attach useful information to the trace detailing what it did to the schedule.
Implementations§
Source§impl<Dim: Dimension> Trace<Dim>
impl<Dim: Dimension> Trace<Dim>
Sourcepub fn new<T: TraceOutput>(sched: Schedule<Dim>, trace: T) -> Trace<Dim>
pub fn new<T: TraceOutput>(sched: Schedule<Dim>, trace: T) -> Trace<Dim>
Create a new trace that starts with sched and the trace output trace.
Sourcepub fn into_sched(self) -> Schedule<Dim>
pub fn into_sched(self) -> Schedule<Dim>
Discard the trace and take ownership of the final schedule.
Sourcepub fn get<T: TraceOutput>(&self) -> Option<&T>
pub fn get<T: TraceOutput>(&self) -> Option<&T>
Get the trace ouput of a particular generation step. Returns the highest value in the stack or None if it is not in the trace.
Sourcepub fn with<T: TraceOutput>(self, sched: Schedule<Dim>, trace: T) -> Trace<Dim>
pub fn with<T: TraceOutput>(self, sched: Schedule<Dim>, trace: T) -> Trace<Dim>
Push a schedule and trace output onto the stack.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&Schedule<Dim>, &dyn TraceOutput)>
pub fn iter(&self) -> impl Iterator<Item = (&Schedule<Dim>, &dyn TraceOutput)>
Iterate over all generation steps.
Trait Implementations§
Auto Trait Implementations§
impl<Dim> Freeze for Trace<Dim>
impl<Dim> !RefUnwindSafe for Trace<Dim>
impl<Dim> !Send for Trace<Dim>
impl<Dim> !Sync for Trace<Dim>
impl<Dim> Unpin for Trace<Dim>where
Dim: Unpin,
impl<Dim> !UnwindSafe for Trace<Dim>
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