#[non_exhaustive]pub enum CompressionOpt {
Uncompressed,
Zstd(i32),
Snappy,
}Expand description
Supported parquet compression codecs. Phase 3 ships the spec’s
recommended default — zstd-3. The variant set is #[non_exhaustive] so
future codecs can land without a breaking API change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Uncompressed
No compression — useful for fuzz / debugging.
Zstd(i32)
Zstandard with the supplied level (1..=22; 3 is the spec default).
Snappy
Snappy.
Implementations§
Source§impl CompressionOpt
impl CompressionOpt
Sourcepub fn zstd(level: i32) -> Result<Self, ValidationError>
pub fn zstd(level: i32) -> Result<Self, ValidationError>
Construct a Zstd(level) with explicit validation against the codec’s
1..=22 range. Prefer this over the bare Self::Zstd(level) variant
when the level originates from user input — the bare variant cannot
reject out-of-range values until the writer constructs the
underlying ZstdLevel, where the only signal would be a silent
fall-through. Spec 70 § Input Validation: reject, don’t sanitize.
§Errors
Returns crate::ValidationError::Range when level is outside
the zstd-1..=22 range.
Trait Implementations§
Source§impl Clone for CompressionOpt
impl Clone for CompressionOpt
Source§fn clone(&self) -> CompressionOpt
fn clone(&self) -> CompressionOpt
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 CompressionOpt
impl Debug for CompressionOpt
Source§impl<'de> Deserialize<'de> for CompressionOpt
impl<'de> Deserialize<'de> for CompressionOpt
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for CompressionOpt
impl PartialEq for CompressionOpt
Source§fn eq(&self, other: &CompressionOpt) -> bool
fn eq(&self, other: &CompressionOpt) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CompressionOpt
impl Serialize for CompressionOpt
impl Copy for CompressionOpt
impl Eq for CompressionOpt
impl StructuralPartialEq for CompressionOpt
Auto Trait Implementations§
impl Freeze for CompressionOpt
impl RefUnwindSafe for CompressionOpt
impl Send for CompressionOpt
impl Sync for CompressionOpt
impl Unpin for CompressionOpt
impl UnsafeUnpin for CompressionOpt
impl UnwindSafe for CompressionOpt
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.