pub enum JsonError {
Undefined,
NonFiniteNumber(Number),
BigInt,
Function,
}Expand description
An Any<A> shape Any::to_json does not (yet) know how to render.
Scoped deliberately: arrays and objects recurse (see Any::to_json),
so every remaining gap here bottoms out at a scalar with no direct JSON
counterpart — mvp-roadmap.md’s open question 2 (“does the MVP print DJS
for those, or report an error?”) is left for later, so this reports an
error rather than guessing at a representation.
to_json itself is hand-written Rust standing in for FJS-compiled
logic — see nanvm/lib/todo/to-json-fjs-migration.md for the plan to
retire it once fjs compile can reach
fjs/media/json/serializer/module.f.mjs.
Variants§
Trait Implementations§
impl StructuralPartialEq for JsonError
Auto Trait Implementations§
impl Freeze for JsonError
impl RefUnwindSafe for JsonError
impl Send for JsonError
impl Sync for JsonError
impl Unpin for JsonError
impl UnsafeUnpin for JsonError
impl UnwindSafe for JsonError
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