pub struct TuningDiff { /* private fields */ }Expand description
An immutable, validated preview owning snapshots of both profiles.
Created by TuningProfile::diff. Storage and iteration are bounded to two
profiles and nine scalar comparisons, with no heap allocation. Later edits
to the original profiles do not change this preview; diff again to review
those edits before calling TuningProfile::replace.
Implementations§
Source§impl TuningDiff
impl TuningDiff
Sourcepub fn changes(&self) -> impl Iterator<Item = TuningChange>
pub fn changes(&self) -> impl Iterator<Item = TuningChange>
Changed values in TuningField declaration order: motion, difficulty,
then assists. Unchanged values are omitted.
Comparison uses float bits, without a tolerance. In particular, changing
an assist from 0.0 to -0.0 is reported because its saved bytes and
fingerprint change. No values are normalized. See TuningProfile::diff
for a complete preview-and-replace example.
Trait Implementations§
Source§impl Clone for TuningDiff
impl Clone for TuningDiff
Source§fn clone(&self) -> TuningDiff
fn clone(&self) -> TuningDiff
Returns a duplicate of the value. Read more
1.0.0 · 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 TuningDiff
impl Debug for TuningDiff
impl Copy for TuningDiff
Auto Trait Implementations§
impl Freeze for TuningDiff
impl RefUnwindSafe for TuningDiff
impl Send for TuningDiff
impl Sync for TuningDiff
impl Unpin for TuningDiff
impl UnwindSafe for TuningDiff
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