pub struct XIncludeOptions {
pub resolver: Option<Arc<dyn EntityResolver>>,
pub max_depth: u32,
pub max_total_bytes: u64,
}Expand description
Options for process_xincludes.
Fields§
§resolver: Option<Arc<dyn EntityResolver>>Resolver used to fetch referenced resources (XML or text).
Without one, every xi:include with href triggers
xi:fallback or errors.
max_depth: u32Maximum include depth — protects against pathological recursion that escapes the cycle-detector (e.g. a → b → a’). Default: 16.
max_total_bytes: u64Maximum total bytes across all included resources. Protects against XInclude bombs analogous to billion-laughs. Default: 10 MB.
Implementations§
Source§impl XIncludeOptions
impl XIncludeOptions
Sourcepub fn new() -> XIncludeOptions
pub fn new() -> XIncludeOptions
Construct with default limits (depth 16, total bytes 10 MB) and no
resolver — every xi:include with href will trigger xi:fallback
or error until a resolver is set.
Trait Implementations§
Source§impl Clone for XIncludeOptions
impl Clone for XIncludeOptions
Source§fn clone(&self) -> XIncludeOptions
fn clone(&self) -> XIncludeOptions
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 Default for XIncludeOptions
impl Default for XIncludeOptions
Source§fn default() -> XIncludeOptions
fn default() -> XIncludeOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for XIncludeOptions
impl !UnwindSafe for XIncludeOptions
impl Freeze for XIncludeOptions
impl Send for XIncludeOptions
impl Sync for XIncludeOptions
impl Unpin for XIncludeOptions
impl UnsafeUnpin for XIncludeOptions
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