Struct Trace

Source
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>

Source

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.

Source

pub fn sched(&self) -> &Schedule<Dim>

Get the final schedule that was generated.

Source

pub fn into_sched(self) -> Schedule<Dim>

Discard the trace and take ownership of the final schedule.

Source

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.

Source

pub fn with<T: TraceOutput>(self, sched: Schedule<Dim>, trace: T) -> Trace<Dim>

Push a schedule and trace output onto the stack.

Source

pub fn iter(&self) -> impl Iterator<Item = (&Schedule<Dim>, &dyn TraceOutput)>

Iterate over all generation steps.

Trait Implementations§

Source§

impl<Dim: Dimension> Debug for Trace<Dim>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V