pub struct ResolutionReportLimits {
pub max_units: u32,
pub max_definitions: u32,
pub max_references: u32,
}Expand description
How many units, definitions, references, and resolution records one report may contain.
The default is the fixed-width identifier ceiling, so on the writer path the
configured limit and the ceiling are enforced by the same check rather than
by two rules that can disagree. Callers may apply the same limits while
decoding through ResolutionReport::deserialize_with_limits.
Fields§
§max_units: u32Maximum number of resolution units.
max_definitions: u32Maximum number of definitions.
max_references: u32Maximum number of references.
Decoding applies the same ceiling to resolution records because a valid report carries exactly one record per reference.
Implementations§
Source§impl ResolutionReportLimits
impl ResolutionReportLimits
Sourcepub fn admit_unit(&self, count: usize) -> Result<u32, ResolutionReportError>
pub fn admit_unit(&self, count: usize) -> Result<u32, ResolutionReportError>
The index the next unit would take, or the capacity refusal.
Sourcepub fn admit_definition(
&self,
count: usize,
) -> Result<u32, ResolutionReportError>
pub fn admit_definition( &self, count: usize, ) -> Result<u32, ResolutionReportError>
The index the next definition would take, or the capacity refusal.
Sourcepub fn admit_reference(
&self,
count: usize,
) -> Result<u32, ResolutionReportError>
pub fn admit_reference( &self, count: usize, ) -> Result<u32, ResolutionReportError>
The index the next reference would take, or the capacity refusal.
Trait Implementations§
Source§impl Clone for ResolutionReportLimits
impl Clone for ResolutionReportLimits
Source§fn clone(&self) -> ResolutionReportLimits
fn clone(&self) -> ResolutionReportLimits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more