Struct roxmltree::ParsingOptions
source · pub struct ParsingOptions {
pub allow_dtd: bool,
pub nodes_limit: u32,
}
Expand description
Parsing options.
Fields§
§allow_dtd: bool
Allow DTD parsing.
When set to false
, XML with DTD will cause an error.
Empty DTD block is not an error.
Currently, there is no option to simply skip DTD.
Mainly because you will get UnknownEntityReference
error later anyway.
This flag is set to false
by default for security reasons,
but roxmltree
still has checks for billion laughs attack,
so this is just an extra security measure.
Default: false
nodes_limit: u32
Sets the maximum number of nodes to parse.
Useful when dealing with random input to limit memory usage.
Default: u32::MAX (no limit)
Trait Implementations§
source§impl Clone for ParsingOptions
impl Clone for ParsingOptions
source§fn clone(&self) -> ParsingOptions
fn clone(&self) -> ParsingOptions
Returns a copy of the value. Read more
1.0.0 · 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 ParsingOptions
impl Debug for ParsingOptions
source§impl Default for ParsingOptions
impl Default for ParsingOptions
source§impl PartialEq for ParsingOptions
impl PartialEq for ParsingOptions
source§fn eq(&self, other: &ParsingOptions) -> bool
fn eq(&self, other: &ParsingOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ParsingOptions
impl Eq for ParsingOptions
impl StructuralPartialEq for ParsingOptions
Auto Trait Implementations§
impl Freeze for ParsingOptions
impl RefUnwindSafe for ParsingOptions
impl Send for ParsingOptions
impl Sync for ParsingOptions
impl Unpin for ParsingOptions
impl UnwindSafe for ParsingOptions
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