pub struct SnapshotDiff {
pub removed: Vec<u32>,
pub added: Vec<u32>,
pub moved: Vec<u32>,
pub max_displacement: f64,
pub time_delta: f64,
}Expand description
Difference report between two snapshots.
Fields§
§removed: Vec<u32>Handles present in A but not in B (removed bodies).
added: Vec<u32>Handles present in B but not in A (added bodies).
moved: Vec<u32>Handles present in both with changed position (beyond threshold).
max_displacement: f64Maximum position displacement among all common bodies.
time_delta: f64Time difference between snapshots.
Implementations§
Source§impl SnapshotDiff
impl SnapshotDiff
Sourcepub fn is_identical(&self) -> bool
pub fn is_identical(&self) -> bool
Returns true if there are no differences.
Sourcepub fn change_count(&self) -> usize
pub fn change_count(&self) -> usize
Total number of changed bodies.
Trait Implementations§
Source§impl Clone for SnapshotDiff
impl Clone for SnapshotDiff
Source§fn clone(&self) -> SnapshotDiff
fn clone(&self) -> SnapshotDiff
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 moreAuto Trait Implementations§
impl Freeze for SnapshotDiff
impl RefUnwindSafe for SnapshotDiff
impl Send for SnapshotDiff
impl Sync for SnapshotDiff
impl Unpin for SnapshotDiff
impl UnsafeUnpin for SnapshotDiff
impl UnwindSafe for SnapshotDiff
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.