pub struct XPathConfig {
pub max_input_bytes: Option<usize>,
}Expand description
Configuration for XPath evaluation.
§Security note (XPH-002)
The underlying sxd-xpath crate is unmaintained. This config provides
a max_input_bytes guard to limit resource consumption.
§TODO(XPH-001): Namespace support
The XPath evaluation context does not yet support namespace declarations.
To evaluate expressions with XML namespaces (e.g. /soap:Envelope/soap:Body),
a namespace map (HashMap<String, String> mapping prefix → URI) must be
added to this config and registered with the sxd_xpath::Context before
evaluation.
Fields§
§max_input_bytes: Option<usize>Maximum allowed XML input size in bytes. Default: 1 MiB.
Trait Implementations§
Source§impl Clone for XPathConfig
impl Clone for XPathConfig
Source§fn clone(&self) -> XPathConfig
fn clone(&self) -> XPathConfig
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 XPathConfig
impl Debug for XPathConfig
Auto Trait Implementations§
impl Freeze for XPathConfig
impl RefUnwindSafe for XPathConfig
impl Send for XPathConfig
impl Sync for XPathConfig
impl Unpin for XPathConfig
impl UnsafeUnpin for XPathConfig
impl UnwindSafe for XPathConfig
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