#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct InspectLimits {
pub max_depth: usize,
pub max_items: usize,
pub max_nodes: usize,
pub max_string_length: usize,
pub max_bytes: usize,
}
impl InspectLimits {
pub const fn unlimited() -> Self {
Self {
max_depth: usize::MAX,
max_items: usize::MAX,
max_nodes: usize::MAX,
max_string_length: usize::MAX,
max_bytes: usize::MAX,
}
}
pub const fn debug() -> Self {
Self {
max_depth: 32,
max_items: 100,
max_nodes: 10_000,
max_string_length: 1024,
max_bytes: 4096,
}
}
pub const fn compact() -> Self {
Self {
max_depth: 8,
max_items: 10,
max_nodes: 1000,
max_string_length: 128,
max_bytes: 256,
}
}
}
impl Default for InspectLimits {
fn default() -> Self {
Self::debug()
}
}