pub struct DecisionTrace { /* private fields */ }Expand description
One plan’s decisions, in the order it made them.
§Ordering
Selection order is the trace’s own meaning, so an identity may be derived from it: two plans that decided the same things in a different order decided differently.
Implementations§
Source§impl DecisionTrace
impl DecisionTrace
Sourcepub fn encode_into(&self, into: &mut Vec<u8>)
pub fn encode_into(&self, into: &mut Vec<u8>)
Appends this trace’s canonical bytes: the entry count, then every entry in selection order.
Source§impl DecisionTrace
impl DecisionTrace
Sourcepub fn from_entry(entry: TraceEntry) -> Self
pub fn from_entry(entry: TraceEntry) -> Self
The one-entry trace, for a plan that decided once.
Sourcepub fn recorded(offered: Vec<TraceEntry>) -> Result<Self, NonEmptyError>
pub fn recorded(offered: Vec<TraceEntry>) -> Result<Self, NonEmptyError>
Records these entries as the decisions a plan made, in the order they are offered.
§Errors
Returns NonEmptyError when no entry is offered, or when more are offered than a trace admits.
Sourcepub fn first(&self) -> &TraceEntry
pub fn first(&self) -> &TraceEntry
The first decision the plan made, which every trace has.
Sourcepub fn entries(&self) -> &NonEmpty<TraceEntry, TRACE_ENTRY_LIMIT>
pub fn entries(&self) -> &NonEmpty<TraceEntry, TRACE_ENTRY_LIMIT>
The entries, in selection order; structurally at least one.
Trait Implementations§
Source§impl Clone for DecisionTrace
impl Clone for DecisionTrace
Source§fn clone(&self) -> DecisionTrace
fn clone(&self) -> DecisionTrace
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecisionTrace
impl Debug for DecisionTrace
impl Eq for DecisionTrace
Source§impl Hash for DecisionTrace
impl Hash for DecisionTrace
Source§impl PartialEq for DecisionTrace
impl PartialEq for DecisionTrace
impl StructuralPartialEq for DecisionTrace
Auto Trait Implementations§
impl Freeze for DecisionTrace
impl RefUnwindSafe for DecisionTrace
impl Send for DecisionTrace
impl Sync for DecisionTrace
impl Unpin for DecisionTrace
impl UnsafeUnpin for DecisionTrace
impl UnwindSafe for DecisionTrace
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