pub struct Limits {Show 20 fields
pub max_reader_input_bytes: Option<usize>,
pub max_buffered_comment_events: Option<usize>,
pub simple_key_max_lookahead: Option<usize>,
pub flow_nesting_limit: Option<usize>,
pub max_events: Option<usize>,
pub max_aliases: Option<usize>,
pub max_anchors: Option<usize>,
pub max_recorded_anchor_events: Option<usize>,
pub max_recorded_anchor_bytes: Option<usize>,
pub max_property_expansion_depth: Option<usize>,
pub max_total_property_interpolation_work: Option<usize>,
pub max_depth: Option<usize>,
pub max_inclusion_depth: Option<u32>,
pub max_documents: Option<usize>,
pub max_nodes: Option<usize>,
pub max_total_scalar_bytes: Option<usize>,
pub max_total_comment_bytes: Option<usize>,
pub max_merge_keys: Option<usize>,
pub alias_anchor_min_aliases: Option<usize>,
pub alias_anchor_ratio_multiplier: Option<usize>,
}Expand description
Overrides for serde-saphyr’s Budget, one per field. None
leaves the field to the next tier.
Each field is decided on its own, highest first:
- the call:
Input::limits; - the repository:
limits:inREPO_FILE, installed byuse_repo_limits; - the process:
set_default_limits, orApp::input_limits; - serde-saphyr’s own default.
A repository beats a tool’s default because the operator owns it, as an operator’s environment beats a tool’s built-in width.
enforce_alias_anchor_ratio is not here: the ratio check is one
comparison after scanning, so turning it off saves nothing. It
stays on; its multiplier and minimum alias count are overridable.
Fields§
§max_reader_input_bytes: Option<usize>Bytes of input text. Also checked for text already in memory.
max_buffered_comment_events: Option<usize>Comment events buffered while resolving an ambiguous entry.
simple_key_max_lookahead: Option<usize>Characters scanned to resolve a simple key.
flow_nesting_limit: Option<usize>Simultaneously nested flow collections.
max_events: Option<usize>Parser events in total.
max_aliases: Option<usize>Alias (*ref) events.
max_anchors: Option<usize>Distinct anchor (&anchor) definitions.
max_recorded_anchor_events: Option<usize>Event copies retained for anchors.
max_recorded_anchor_bytes: Option<usize>Bytes of string payload retained for anchors.
max_property_expansion_depth: Option<usize>Nested expansions in one property interpolation.
max_total_property_interpolation_work: Option<usize>Bytes inspected across all property interpolation.
max_depth: Option<usize>Nesting of sequences and mappings.
max_inclusion_depth: Option<u32>Nesting of !include.
max_documents: Option<usize>YAML documents in one text.
max_nodes: Option<usize>Sequences, mappings, and scalars in total.
max_total_scalar_bytes: Option<usize>Bytes of scalar text in total.
max_total_comment_bytes: Option<usize>Bytes of comment text in total.
max_merge_keys: Option<usize>Merge keys (<<). ctl-core refuses merge keys whatever this says.
alias_anchor_min_aliases: Option<usize>Aliases allowed before the alias-to-anchor ratio applies.
alias_anchor_ratio_multiplier: Option<usize>How many aliases each anchor may have once the ratio applies.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Limits
impl<'de> Deserialize<'de> for Limits
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more