Skip to main content

ResourcePolicy

Struct ResourcePolicy 

Source
pub struct ResourcePolicy {
Show 29 fields pub max_xml_nodes: usize, pub max_references: usize, pub max_transforms_per_reference: usize, pub max_xml_base_components: usize, pub max_xml_base_resolution_bytes: usize, pub max_canonicalized_bytes: usize, pub max_external_resource_bytes: usize, pub max_external_resource_total_bytes: usize, pub max_encryption_plaintext_bytes: usize, pub max_xml_document_bytes: usize, pub max_encryption_recipients: usize, pub max_encryption_metadata_bytes: usize, pub max_key_candidates: usize, pub max_base64_transform_input_bytes: usize, pub max_base64_transform_output_bytes: usize, pub max_xpath_expressions: usize, pub max_xpath_expression_bytes: usize, pub max_xpath_expression_complexity: usize, pub max_xpath_context_evaluations: usize, pub max_xpath_evaluation_work: usize, pub max_xpath_mirror_string_bytes: usize, pub max_xpath_string_work_bytes: usize, pub max_xpath_namespace_bindings: usize, pub max_xpath_namespace_bytes: usize, pub max_xpath_filters: usize, pub max_node_set_filter_work: usize, pub max_node_set_entries: usize, pub max_node_set_owned_string_bytes: usize, pub max_node_set_cumulative_owned_string_bytes: usize,
}
Expand description

Resource ceilings shared by parsing, transforms, and cryptographic output.

Fields§

§max_xml_nodes: usize

Maximum XML nodes in one parsed document.

§max_references: usize

Maximum references in one signature or manifest.

§max_transforms_per_reference: usize

Maximum transforms in one reference.

§max_xml_base_components: usize

Maximum inherited xml:base components in one URI resolution.

§max_xml_base_resolution_bytes: usize

Maximum cumulative bytes processed while resolving xml:base URIs.

§max_canonicalized_bytes: usize

Maximum canonical bytes retained across one signature operation.

§max_external_resource_bytes: usize

Maximum decoded external resource bytes.

§max_external_resource_total_bytes: usize

Maximum bytes in the complete external map and cumulatively dereferenced.

§max_encryption_plaintext_bytes: usize

Maximum XMLEnc plaintext bytes.

§max_xml_document_bytes: usize

Maximum caller-owned XML bytes accepted by any document operation.

§max_encryption_recipients: usize

Maximum independently wrapped recipients.

§max_encryption_metadata_bytes: usize

Maximum caller-controlled XMLEnc metadata bytes per field.

§max_key_candidates: usize

Maximum key and certificate candidates inspected by one operation.

§max_base64_transform_input_bytes: usize

Maximum bytes accepted by Base64 transforms before decoding.

§max_base64_transform_output_bytes: usize

Maximum cumulative bytes emitted by Base64 transforms in one operation.

§max_xpath_expressions: usize

Maximum XPath expressions evaluated by one signature operation.

§max_xpath_expression_bytes: usize

Maximum UTF-8 bytes in one XPath expression.

§max_xpath_expression_complexity: usize

Maximum structural complexity accepted for one XPath expression.

§max_xpath_context_evaluations: usize

Maximum context-node evaluations for one ordinary XPath transform.

§max_xpath_evaluation_work: usize

Maximum conservative XPath node-evaluation work per operation.

§max_xpath_mirror_string_bytes: usize

Maximum source strings copied into the XPath mirror.

§max_xpath_string_work_bytes: usize

Maximum conservative XPath string-processing work per operation.

§max_xpath_namespace_bindings: usize

Maximum namespace bindings captured by one XPath expression.

§max_xpath_namespace_bytes: usize

Maximum aggregate namespace prefix and URI bytes per XPath expression.

§max_xpath_filters: usize

Maximum filters in one XPath Filter 2.0 transform.

§max_node_set_filter_work: usize

Maximum cumulative node-set entries visited by filtering transforms.

§max_node_set_entries: usize

Maximum entries materialized in one exact node set.

§max_node_set_owned_string_bytes: usize

Maximum owned string bytes in one materialized node set.

§max_node_set_cumulative_owned_string_bytes: usize

Maximum cumulative owned node-set string bytes per operation.

Implementations§

Source§

impl ResourcePolicy

Source

pub fn validate(&self) -> Result<(), PolicyViolation>

Validate policy values against non-configurable implementation ceilings.

Trait Implementations§

Source§

impl Clone for ResourcePolicy

Source§

fn clone(&self) -> ResourcePolicy

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResourcePolicy

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ResourcePolicy

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for ResourcePolicy

Source§

impl PartialEq for ResourcePolicy

Source§

fn eq(&self, other: &ResourcePolicy) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ResourcePolicy

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.