pub struct PhaseStats {
pub phase_index: usize,
pub phase_type: &'static str,
pub step_count: u64,
pub moves_evaluated: u64,
pub moves_accepted: u64,
/* private fields */
}Fields§
§phase_index: usize§phase_type: &'static str§step_count: u64§moves_evaluated: u64§moves_accepted: u64Implementations§
Source§impl PhaseStats
impl PhaseStats
pub fn elapsed(&self) -> Duration
pub fn elapsed_ms(&self) -> u64
Sourcepub fn record_step(&mut self)
pub fn record_step(&mut self)
Records a step completion.
Sourcepub fn record_move(&mut self, accepted: bool)
pub fn record_move(&mut self, accepted: bool)
Records a move evaluation and whether it was accepted.
pub fn moves_per_second(&self) -> u64
pub fn acceptance_rate(&self) -> f64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PhaseStats
impl RefUnwindSafe for PhaseStats
impl Send for PhaseStats
impl Sync for PhaseStats
impl Unpin for PhaseStats
impl UnsafeUnpin for PhaseStats
impl UnwindSafe for PhaseStats
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more