pub struct Options {
pub proto_action: Action,
pub constructor_action: Action,
pub safe: bool,
}Expand description
Configuration for parse, parse_bytes, and scan.
Build one with Options::default and the chained setters. The defaults
match a strict parser: both actions are Action::Error and safe is off.
Fields§
§proto_action: ActionAction for a __proto__ key.
constructor_action: ActionAction for a constructor.prototype nesting.
safe: boolWhen true, a detected violation returns Ok(None) instead of an error.
Implementations§
Source§impl Options
impl Options
Sourcepub fn proto_action(self, action: Action) -> Self
pub fn proto_action(self, action: Action) -> Self
Set the action for __proto__ keys.
Sourcepub fn constructor_action(self, action: Action) -> Self
pub fn constructor_action(self, action: Action) -> Self
Set the action for constructor.prototype nestings.
Trait Implementations§
impl Copy for Options
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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