pub struct DefragmentationPlan {
pub moves: Vec<DefragMove>,
pub total_bytes: u64,
pub expected_fragmentation: f64,
pub current_fragmentation: f64,
}Expand description
Defragmentation plan containing all moves needed
Fields§
§moves: Vec<DefragMove>List of move operations to perform
total_bytes: u64Total bytes to be moved
expected_fragmentation: f64Expected fragmentation after defragmentation
current_fragmentation: f64Current fragmentation level
Implementations§
Source§impl DefragmentationPlan
impl DefragmentationPlan
Sourcepub fn is_worthwhile(&self, min_improvement: f64) -> bool
pub fn is_worthwhile(&self, min_improvement: f64) -> bool
Check if defragmentation is worthwhile
Sourcepub fn move_count(&self) -> usize
pub fn move_count(&self) -> usize
Get the number of moves
Trait Implementations§
Source§impl Clone for DefragmentationPlan
impl Clone for DefragmentationPlan
Source§fn clone(&self) -> DefragmentationPlan
fn clone(&self) -> DefragmentationPlan
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 DefragmentationPlan
impl Debug for DefragmentationPlan
Source§impl Default for DefragmentationPlan
impl Default for DefragmentationPlan
Source§fn default() -> DefragmentationPlan
fn default() -> DefragmentationPlan
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DefragmentationPlan
impl RefUnwindSafe for DefragmentationPlan
impl Send for DefragmentationPlan
impl Sync for DefragmentationPlan
impl Unpin for DefragmentationPlan
impl UnsafeUnpin for DefragmentationPlan
impl UnwindSafe for DefragmentationPlan
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