pub struct ExternalTemplateLimitsConfig {
pub max_total_source_bytes: Option<usize>,
pub max_include_count: Option<u32>,
pub max_include_depth: Option<u32>,
pub max_template_size: Option<usize>,
pub reload_timeout_ms: Option<u64>,
}Expand description
Operator-facing limits block. None means “use the rust-camel default”.
Surfaced in Camel.toml as:
[components.template.limits]
max-total-source-bytes = 16777216
max-include-count = 64
max-include-depth = 16
max-template-size = 1048576
reload-timeout-ms = 5000Fields§
§max_total_source_bytes: Option<usize>Maximum total source bytes across the dependency closure of a single template set. Defaults to 16 MiB when unset.
max_include_count: Option<u32>Maximum number of included/imported templates per closure. Defaults to 64 when unset.
max_include_depth: Option<u32>Maximum include/extends nesting depth. Defaults to 16 when unset.
max_template_size: Option<usize>Maximum size of a single template file in bytes. Defaults to 1 MiB when unset.
reload_timeout_ms: Option<u64>Wall-clock budget for a full reload build, in milliseconds. Defaults to 5000 ms when unset.
Implementations§
Source§impl ExternalTemplateLimitsConfig
impl ExternalTemplateLimitsConfig
Sourcepub fn resolve(
&self,
) -> Result<ResolvedExternalTemplateLimits, TemplateReloadError>
pub fn resolve( &self, ) -> Result<ResolvedExternalTemplateLimits, TemplateReloadError>
Fold operator-supplied values to finite, non-zero defaults. Any
explicitly-set Some(0) is rejected (zero would silently disable the
bound); None substitutes the documented default.
Trait Implementations§
Source§impl Clone for ExternalTemplateLimitsConfig
impl Clone for ExternalTemplateLimitsConfig
Source§fn clone(&self) -> ExternalTemplateLimitsConfig
fn clone(&self) -> ExternalTemplateLimitsConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExternalTemplateLimitsConfig
impl Debug for ExternalTemplateLimitsConfig
Source§impl Default for ExternalTemplateLimitsConfig
impl Default for ExternalTemplateLimitsConfig
Source§fn default() -> ExternalTemplateLimitsConfig
fn default() -> ExternalTemplateLimitsConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ExternalTemplateLimitsConfig
impl<'de> Deserialize<'de> for ExternalTemplateLimitsConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ExternalTemplateLimitsConfig
impl StructuralPartialEq for ExternalTemplateLimitsConfig
Auto Trait Implementations§
impl Freeze for ExternalTemplateLimitsConfig
impl RefUnwindSafe for ExternalTemplateLimitsConfig
impl Send for ExternalTemplateLimitsConfig
impl Sync for ExternalTemplateLimitsConfig
impl Unpin for ExternalTemplateLimitsConfig
impl UnsafeUnpin for ExternalTemplateLimitsConfig
impl UnwindSafe for ExternalTemplateLimitsConfig
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