pub struct CleanupPlan {
pub action: CleanupAction,
pub affected_classes: Vec<DataClass>,
pub estimated_recovered_bytes: u64,
pub requires_rebuild: bool,
pub requires_confirmation: bool,
}Expand description
A cleanup plan: produced first, executed second (RFC-001 §14).
Fields§
§action: CleanupAction§affected_classes: Vec<DataClass>§estimated_recovered_bytes: u64§requires_rebuild: bool§requires_confirmation: boolImplementations§
Source§impl CleanupPlan
impl CleanupPlan
Sourcepub fn for_action(action: CleanupAction, estimated_recovered_bytes: u64) -> Self
pub fn for_action(action: CleanupAction, estimated_recovered_bytes: u64) -> Self
Build the plan for an action with an estimated byte impact.
Sourcepub fn assert_safe_for_ordinary_cleanup(&self) -> Result<(), OrbokError>
pub fn assert_safe_for_ordinary_cleanup(&self) -> Result<(), OrbokError>
Safe cleanup must never include the persistent catalog. Executors call this before running anything that has not been explicitly confirmed as a destructive reset.
Trait Implementations§
Source§impl Clone for CleanupPlan
impl Clone for CleanupPlan
Source§fn clone(&self) -> CleanupPlan
fn clone(&self) -> CleanupPlan
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 CleanupPlan
impl Debug for CleanupPlan
Source§impl<'de> Deserialize<'de> for CleanupPlan
impl<'de> Deserialize<'de> for CleanupPlan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CleanupPlan
impl RefUnwindSafe for CleanupPlan
impl Send for CleanupPlan
impl Sync for CleanupPlan
impl Unpin for CleanupPlan
impl UnsafeUnpin for CleanupPlan
impl UnwindSafe for CleanupPlan
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