pub enum JsonProjectionMode {
TaggedCanonical,
UntaggedInterop,
TextLossy,
}Expand description
Selects which Expr <-> JSON projection to apply.
Variants§
TaggedCanonical
The canonical, lossless projection: $expr-tagged forms that round-trip
every Expr exactly. Delegates to crate::expr_to_json /
crate::json_to_expr.
UntaggedInterop
A lossy interop projection that emits/accepts plain, untagged JSON.
This is intended for foreign surfaces (for example LLM tool schemas and
tool-call arguments) that expect ordinary JSON without kernel tags. It is
NOT the canonical codec: structure such as symbols vs strings, number
domains, vectors vs lists, and most non-collection forms is collapsed and
cannot be recovered. Use JsonProjectionMode::TaggedCanonical whenever
faithful round-tripping is required.
TextLossy
A one-way, lossy text projection: Expr -> JSON produces a JSON string
containing the debug rendering of the expression. There is no faithful
inverse; JSON -> Expr reuses the JsonProjectionMode::UntaggedInterop
decoder.
Trait Implementations§
Source§impl Clone for JsonProjectionMode
impl Clone for JsonProjectionMode
Source§fn clone(&self) -> JsonProjectionMode
fn clone(&self) -> JsonProjectionMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for JsonProjectionMode
Source§impl Debug for JsonProjectionMode
impl Debug for JsonProjectionMode
impl Eq for JsonProjectionMode
Source§impl PartialEq for JsonProjectionMode
impl PartialEq for JsonProjectionMode
impl StructuralPartialEq for JsonProjectionMode
Auto Trait Implementations§
impl Freeze for JsonProjectionMode
impl RefUnwindSafe for JsonProjectionMode
impl Send for JsonProjectionMode
impl Sync for JsonProjectionMode
impl Unpin for JsonProjectionMode
impl UnsafeUnpin for JsonProjectionMode
impl UnwindSafe for JsonProjectionMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.