pub enum WireStructure {
Off,
Affine,
Auto,
}Expand description
Whether the encoder may replace a column with a closed-form generator when the
data is mathematically structured — the Futamura move on the wire: if the values
are described by a formula, ship the formula, not the values. Every form is
lossless and gated by an exact-match proof, so it can never change the decoded
value; the decoder always reconstructs (each form has its own tag). Off by
default (detection is an O(n) scan the speed dials skip), opt-in per send.
Variants§
Off
No structural analysis — integer columns encode by the numeric dial.
Affine
Detect an affine progression v[i] = base + i·stride; when every element
matches exactly (wrapping i64), send (base, stride, n) — three numbers for
the whole column — instead of the data. Falls back to the numeric dial when
the data is not affine, so it never grows a message or loses a value.
Auto
The full per-column compression menu: build every applicable encoding
(varint baseline · affine · delta · delta-of-delta · frame-of-reference
bit-packing · run-length · dictionary) and ship the SMALLEST. The varint
baseline is always a candidate, so the result is never larger than Off’s
varint — each encoding is a categorical win on its shape (monotone,
near-linear timestamps, clustered, runs, low-cardinality) and silently loses
the bake-off otherwise. The “smallest” knob.
Trait Implementations§
Source§impl Clone for WireStructure
impl Clone for WireStructure
Source§fn clone(&self) -> WireStructure
fn clone(&self) -> WireStructure
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WireStructure
impl Debug for WireStructure
Source§impl PartialEq for WireStructure
impl PartialEq for WireStructure
Source§fn eq(&self, other: &WireStructure) -> bool
fn eq(&self, other: &WireStructure) -> bool
self and other values to be equal, and is used by ==.impl Copy for WireStructure
impl Eq for WireStructure
impl StructuralPartialEq for WireStructure
Auto Trait Implementations§
impl Freeze for WireStructure
impl RefUnwindSafe for WireStructure
impl Send for WireStructure
impl Sync for WireStructure
impl Unpin for WireStructure
impl UnsafeUnpin for WireStructure
impl UnwindSafe for WireStructure
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.