pub const DEFAULT_MAX_CONCURRENCY: usize = 50;
#[derive(Debug, Clone)]
pub struct SnapshotOptions {
pub(crate) max_concurrency: usize,
pub(crate) include_refs: bool,
}
impl Default for SnapshotOptions {
fn default() -> Self {
Self {
max_concurrency: DEFAULT_MAX_CONCURRENCY,
include_refs: true,
}
}
}
impl SnapshotOptions {
#[must_use]
pub fn max_concurrency(mut self, max: usize) -> Self {
self.max_concurrency = max;
self
}
#[must_use]
pub fn include_refs(mut self, include: bool) -> Self {
self.include_refs = include;
self
}
pub fn get_max_concurrency(&self) -> usize {
self.max_concurrency
}
pub fn get_include_refs(&self) -> bool {
self.include_refs
}
}