pub struct SegmentMigrationReport<const N: usize> {
pub advice: [SegmentAdvice; N],
pub count: usize,
pub preserve_bytes: u32,
pub clearable_bytes: u32,
pub rebuildable_bytes: u32,
}Expand description
Segment-level migration report for a segmented account.
Analyzes each segment’s role and produces per-segment migration advice. This lets the migration planner tell you which segments are safe to clear, which must be preserved, and which can be rebuilt from other data.
Fields§
§advice: [SegmentAdvice; N]§count: usize§preserve_bytes: u32Total bytes in segments that must be preserved.
clearable_bytes: u32Total bytes in segments that can be cleared.
rebuildable_bytes: u32Total bytes in segments that can be rebuilt.
Implementations§
Source§impl<const N: usize> SegmentMigrationReport<N>
impl<const N: usize> SegmentMigrationReport<N>
Sourcepub fn analyze(segments: &[DecodedSegment], count: usize) -> Self
pub fn analyze(segments: &[DecodedSegment], count: usize) -> Self
Analyze decoded segments and produce migration advice per segment.
Sourcepub fn must_preserve_count(&self) -> usize
pub fn must_preserve_count(&self) -> usize
Number of segments that must be preserved during migration.
Sourcepub fn clearable_count(&self) -> usize
pub fn clearable_count(&self) -> usize
Number of segments that can be safely cleared during migration.
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize> Freeze for SegmentMigrationReport<N>
impl<const N: usize> RefUnwindSafe for SegmentMigrationReport<N>
impl<const N: usize> Send for SegmentMigrationReport<N>
impl<const N: usize> Sync for SegmentMigrationReport<N>
impl<const N: usize> Unpin for SegmentMigrationReport<N>
impl<const N: usize> UnsafeUnpin for SegmentMigrationReport<N>
impl<const N: usize> UnwindSafe for SegmentMigrationReport<N>
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