pub struct ResourceLimits {
pub input_bytes: u64,
pub bundle_entries: u64,
pub graph_elements: u64,
pub metadata_bytes: u64,
pub depth: u64,
pub steps: u64,
pub output_bytes: u64,
}Expand description
What a single operation is allowed to consume.
Every field is a maximum. 0 means unbounded, which is a
deliberate choice a Rust caller can make and which no FFI or
command-line entry point selects by default: unbounded behaviour
should be asked for, never inherited.
Fields§
§input_bytes: u64Bytes of input accepted in one operation.
bundle_entries: u64Documents in one bundle.
graph_elements: u64Vertices, edges and nodes in a decoded schema or instance.
metadata_bytes: u64Bytes of metadata attached to a schema or instance.
depth: u64Levels of nesting descended.
steps: u64Steps of evaluation or search performed.
output_bytes: u64Bytes of output produced.
Implementations§
Source§impl ResourceLimits
impl ResourceLimits
Sourcepub const fn defaults() -> Self
pub const fn defaults() -> Self
The defaults every untrusted public surface uses.
Chosen to admit any document a person would plausibly author while refusing one built to exhaust a machine. The depth bound matches the walk and extraction depths that already existed, so this changes no behaviour those already governed.
Trait Implementations§
Source§impl Clone for ResourceLimits
impl Clone for ResourceLimits
Source§fn clone(&self) -> ResourceLimits
fn clone(&self) -> ResourceLimits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more