pub struct StateView<'a, S: UserState> { /* private fields */ }Expand description
Read-only view into engine state at a single point in time.
This type is used by:
- observers
- logging systems
- extensions
- external monitoring hooks
It provides safe immutable access without exposing ownership
of the underlying State<S>.
Implementations§
Source§impl<'a, S> StateView<'a, S>
impl<'a, S> StateView<'a, S>
Sourcepub fn best_measure(&self) -> S::Float
pub fn best_measure(&self) -> S::Float
Best convergence value observed so far.
Sourcepub fn current_measure(&self) -> S::Float
pub fn current_measure(&self) -> S::Float
Current convergence value.
Sourcepub fn iterations_since_best(&self) -> usize
pub fn iterations_since_best(&self) -> usize
Number of iterations since the last improvement.
Trait Implementations§
impl<'a, S: UserState> Copy for StateView<'a, S>
Auto Trait Implementations§
impl<'a, S> Freeze for StateView<'a, S>
impl<'a, S> RefUnwindSafe for StateView<'a, S>where
&'a State<S>: RefUnwindSafe,
impl<'a, S> Send for StateView<'a, S>
impl<'a, S> Sync for StateView<'a, S>
impl<'a, S> Unpin for StateView<'a, S>
impl<'a, S> UnsafeUnpin for StateView<'a, S>where
&'a State<S>: UnsafeUnpin,
impl<'a, S> UnwindSafe for StateView<'a, S>where
&'a State<S>: UnwindSafe,
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