pub enum SafeOutcome {
Value(Value),
Violation,
Malformed,
}Expand description
The three outcomes of safe_parse.
The variant names state the outcome. The JavaScript safeParse maps the
same three cases to a value, null for a violation, and undefined for a
parse error.
Variants§
Value(Value)
Parsed cleanly. Holds the value.
Violation
A forbidden prototype property was found. JavaScript returns null.
Malformed
The JSON text was malformed. JavaScript returns undefined.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SafeOutcome
impl RefUnwindSafe for SafeOutcome
impl Send for SafeOutcome
impl Sync for SafeOutcome
impl Unpin for SafeOutcome
impl UnsafeUnpin for SafeOutcome
impl UnwindSafe for SafeOutcome
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