pub struct DecodeLimits {
pub max_buckets: usize,
pub max_spans: usize,
pub max_custom_values: usize,
pub max_samples: u64,
}Expand description
Caps applied while decoding one chunk.
Fields§
§max_buckets: usizeMaximum number of buckets across the positive and negative spans.
max_spans: usizeMaximum number of spans in the positive or negative span list.
max_custom_values: usizeMaximum number of custom bucket bounds.
max_samples: u64Maximum number of samples a chunk may declare.
Implementations§
Source§impl DecodeLimits
impl DecodeLimits
Sourcepub const UNLIMITED: Self
pub const UNLIMITED: Self
No practical ceiling. Only for trusted data; a 16 MiB histogram chunk can still legitimately expand to hundreds of megabytes of buckets.
Sourcepub fn check_buckets(&self, buckets: usize) -> Result<()>
pub fn check_buckets(&self, buckets: usize) -> Result<()>
Checks a declared bucket count against the limit.
Sourcepub fn check_spans(&self, spans: u64) -> Result<()>
pub fn check_spans(&self, spans: u64) -> Result<()>
Checks a declared span count against the limit.
Sourcepub fn check_custom_values(&self, values: u64) -> Result<()>
pub fn check_custom_values(&self, values: u64) -> Result<()>
Checks a declared custom-bucket count against the limit.
Sourcepub fn check_samples(&self, samples: u64) -> Result<()>
pub fn check_samples(&self, samples: u64) -> Result<()>
Checks a chunk’s declared sample count against the limit.
Trait Implementations§
Source§impl Clone for DecodeLimits
impl Clone for DecodeLimits
impl Copy for DecodeLimits
Source§impl Debug for DecodeLimits
impl Debug for DecodeLimits
Source§impl Default for DecodeLimits
impl Default for DecodeLimits
impl Eq for DecodeLimits
Source§impl PartialEq for DecodeLimits
impl PartialEq for DecodeLimits
impl StructuralPartialEq for DecodeLimits
Auto Trait Implementations§
impl Forget for DecodeLimits
impl Freeze for DecodeLimits
impl Move for DecodeLimits
impl RefUnwindSafe for DecodeLimits
impl Send for DecodeLimits
impl Sync for DecodeLimits
impl Unpin for DecodeLimits
impl UnsafeUnpin for DecodeLimits
impl UnwindSafe for DecodeLimits
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