pub struct ParserConfig { /* private fields */ }Expand description
Configuration provided to the parser.
use anyxml::sax::parser::{ParserConfig, ParserOption::*};
assert!(ParserConfig::default().is_enable(Namespaces));
// It is possible to combine options using `|`.
let mut config = Namespaces | ExternalGeneralEntities;
assert!(config.is_enable(ExternalGeneralEntities));
config |= Validation;
assert!(config.is_enable(Validation));Implementations§
Source§impl ParserConfig
impl ParserConfig
pub fn is_enable(&self, option: ParserOption) -> bool
pub fn set_option(&mut self, option: ParserOption, flag: bool)
Trait Implementations§
Source§impl BitOr<ParserConfig> for ParserOption
impl BitOr<ParserConfig> for ParserOption
Source§type Output = ParserConfig
type Output = ParserConfig
The resulting type after applying the
| operator.Source§impl BitOr<ParserOption> for ParserConfig
impl BitOr<ParserOption> for ParserConfig
Source§type Output = ParserConfig
type Output = ParserConfig
The resulting type after applying the
| operator.Source§impl BitOr for ParserConfig
impl BitOr for ParserConfig
Source§impl BitOrAssign<ParserOption> for ParserConfig
impl BitOrAssign<ParserOption> for ParserConfig
Source§fn bitor_assign(&mut self, rhs: ParserOption)
fn bitor_assign(&mut self, rhs: ParserOption)
Performs the
|= operation. Read moreSource§impl BitOrAssign for ParserConfig
impl BitOrAssign for ParserConfig
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreAuto Trait Implementations§
impl Freeze for ParserConfig
impl RefUnwindSafe for ParserConfig
impl Send for ParserConfig
impl Sync for ParserConfig
impl Unpin for ParserConfig
impl UnwindSafe for ParserConfig
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