pub struct DiskCompactionPlan { /* private fields */ }Expand description
A prefix of an oldest-first runtime chain to consolidate into one base.
The last runtime layer is writable even when the sandbox is stopped. It is never selected. A count is an upper bound on sealed inputs. Fewer than two sealed layers produces a no-op.
Implementations§
Source§impl DiskCompactionPlan
impl DiskCompactionPlan
Sourcepub fn new(
runtime_layers: usize,
layers: Option<usize>,
) -> Result<Self, LayerSelectionError>
pub fn new( runtime_layers: usize, layers: Option<usize>, ) -> Result<Self, LayerSelectionError>
Resolve an optional upper bound of oldest layers, including the base but not the writable head.
Sourcepub fn prefix(&self) -> Range<usize> ⓘ
pub fn prefix(&self) -> Range<usize> ⓘ
Selected oldest-first prefix; an empty range means no rewrite is necessary.
Sourcepub fn retained(&self) -> Range<usize> ⓘ
pub fn retained(&self) -> Range<usize> ⓘ
Layers retained after the prefix, including the writable head.
Sourcepub fn output_layers(&self) -> usize
pub fn output_layers(&self) -> usize
Physical layer count after replacing the selected prefix with a single base.
Trait Implementations§
Source§impl Clone for DiskCompactionPlan
impl Clone for DiskCompactionPlan
Source§fn clone(&self) -> DiskCompactionPlan
fn clone(&self) -> DiskCompactionPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DiskCompactionPlan
impl Debug for DiskCompactionPlan
impl Eq for DiskCompactionPlan
Source§impl PartialEq for DiskCompactionPlan
impl PartialEq for DiskCompactionPlan
impl StructuralPartialEq for DiskCompactionPlan
Auto Trait Implementations§
impl Freeze for DiskCompactionPlan
impl RefUnwindSafe for DiskCompactionPlan
impl Send for DiskCompactionPlan
impl Sync for DiskCompactionPlan
impl Unpin for DiskCompactionPlan
impl UnsafeUnpin for DiskCompactionPlan
impl UnwindSafe for DiskCompactionPlan
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