pub struct PruningPolicy {
pub min_snapshots_before_prune: usize,
pub min_node_age: u64,
pub max_nodes_per_prune: usize,
pub require_stability: bool,
pub preserve_genesis_path: bool,
pub preserve_depth: usize,
}Expand description
Policy for DAG pruning decisions.
Fields§
§min_snapshots_before_prune: usizeMinimum number of snapshots to retain before pruning.
min_node_age: u64Minimum age of nodes (in logical time) before they can be pruned.
max_nodes_per_prune: usizeMaximum number of nodes to prune in one operation.
require_stability: boolWhether to require stability before pruning.
preserve_genesis_path: boolWhether to keep at least one path to genesis.
preserve_depth: usizeDepth of history to preserve beyond the snapshot.
Trait Implementations§
Source§impl Clone for PruningPolicy
impl Clone for PruningPolicy
Source§fn clone(&self) -> PruningPolicy
fn clone(&self) -> PruningPolicy
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 PruningPolicy
impl Debug for PruningPolicy
Source§impl Default for PruningPolicy
impl Default for PruningPolicy
Source§impl<'de> Deserialize<'de> for PruningPolicy
impl<'de> Deserialize<'de> for PruningPolicy
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 PruningPolicy
impl RefUnwindSafe for PruningPolicy
impl Send for PruningPolicy
impl Sync for PruningPolicy
impl Unpin for PruningPolicy
impl UnwindSafe for PruningPolicy
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