pub enum OutputFormat {
Toon,
Json,
Mckp,
}Expand description
Output format for transformations.
Variants§
Toon
TOON format – token-optimized custom format. Wins on cl100k_base
tokenizers but loses ~26% on o200k_base (the modern Anthropic /
OpenAI family). Kept as a baseline; not the recommended default.
See Paper 2 §Savings Accounting.
Json
JSON pretty-printed – for programmatic processing.
Mckp
MCKP v2 – format-adaptive encoder dispatched by structural shape.
Routes object-wrapping-array shapes through the union-of-keys table
renderer (deep_mckp_with_inner_table) and falls back to compact
JSON when no shape applies. Tokenizer-agnostic — see Paper 2
§Encoder Bug Postmortem and §Savings Accounting.
Trait Implementations§
Source§impl Clone for OutputFormat
impl Clone for OutputFormat
Source§fn clone(&self) -> OutputFormat
fn clone(&self) -> OutputFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OutputFormat
impl Debug for OutputFormat
Source§impl PartialEq for OutputFormat
impl PartialEq for OutputFormat
Source§fn eq(&self, other: &OutputFormat) -> bool
fn eq(&self, other: &OutputFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for OutputFormat
impl Eq for OutputFormat
impl StructuralPartialEq for OutputFormat
Auto Trait Implementations§
impl Freeze for OutputFormat
impl RefUnwindSafe for OutputFormat
impl Send for OutputFormat
impl Sync for OutputFormat
impl Unpin for OutputFormat
impl UnsafeUnpin for OutputFormat
impl UnwindSafe for OutputFormat
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
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
Compare self to
key and return true if they are equal.