#[non_exhaustive]pub struct LoaderLimits {
pub max_file_bytes: u32,
pub max_blocks_per_file: u32,
pub max_attr_depth: u32,
pub max_template_parts: u32,
}Expand description
Per-file caps enforced by the loader.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_file_bytes: u32Maximum byte size for any individual file. Default: 4 MiB.
max_blocks_per_file: u32Maximum top-level-or-nested block count per file. Default: 10 000.
max_attr_depth: u32Maximum nested expression depth (objects, lists, conditionals, templates). Default: 64.
max_template_parts: u32Maximum number of parts in a TemplateConcat lowering output.
Default: 1024.
Implementations§
Source§impl LoaderLimits
impl LoaderLimits
Sourcepub fn builder() -> LoaderLimitsBuilder<((), (), (), ())>
pub fn builder() -> LoaderLimitsBuilder<((), (), (), ())>
Create a builder for building LoaderLimits.
On the builder, call .max_file_bytes(...)(optional), .max_blocks_per_file(...)(optional), .max_attr_depth(...)(optional), .max_template_parts(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of LoaderLimits.
Trait Implementations§
Source§impl Clone for LoaderLimits
impl Clone for LoaderLimits
Source§fn clone(&self) -> LoaderLimits
fn clone(&self) -> LoaderLimits
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 LoaderLimits
impl Debug for LoaderLimits
Source§impl Default for LoaderLimits
impl Default for LoaderLimits
Source§impl PartialEq for LoaderLimits
impl PartialEq for LoaderLimits
Source§fn eq(&self, other: &LoaderLimits) -> bool
fn eq(&self, other: &LoaderLimits) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for LoaderLimits
impl Eq for LoaderLimits
impl StructuralPartialEq for LoaderLimits
Auto Trait Implementations§
impl Freeze for LoaderLimits
impl RefUnwindSafe for LoaderLimits
impl Send for LoaderLimits
impl Sync for LoaderLimits
impl Unpin for LoaderLimits
impl UnsafeUnpin for LoaderLimits
impl UnwindSafe for LoaderLimits
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.