pub struct ParquetEncoder<C = Uncompressed> { /* private fields */ }Expand description
Encodes a window into a parquet file held in memory.
The arrow schema is derived from R itself (not sampled from values, so
an empty slice still produces a valid zero-row file), which is why
DeserializeOwned is required alongside Serialize.
The default compression policy is Uncompressed. Select zstd and its
level in the encoder type:
use meathook::{ParquetEncoder, Zstd};
let uncompressed = ParquetEncoder::default();
let zstd_1 = ParquetEncoder::<Zstd>::new();
let zstd_3 = ParquetEncoder::<Zstd<3>>::new();Implementations§
Source§impl<C: ParquetCompression> ParquetEncoder<C>
impl<C: ParquetCompression> ParquetEncoder<C>
Trait Implementations§
Source§impl<C: Clone> Clone for ParquetEncoder<C>
impl<C: Clone> Clone for ParquetEncoder<C>
Source§fn clone(&self) -> ParquetEncoder<C>
fn clone(&self) -> ParquetEncoder<C>
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 moreimpl<C: Copy> Copy for ParquetEncoder<C>
Source§impl<C: Debug> Debug for ParquetEncoder<C>
impl<C: Debug> Debug for ParquetEncoder<C>
Source§impl Default for ParquetEncoder
Available on crate feature parquet only.
impl Default for ParquetEncoder
Available on crate feature
parquet only.Source§impl<C: ParquetCompression> Encoder for ParquetEncoder<C>
Available on crate feature parquet only.
impl<C: ParquetCompression> Encoder for ParquetEncoder<C>
Available on crate feature
parquet only.Source§fn encode<R: Serialize + DeserializeOwned>(
&self,
records: &[R],
) -> Result<Vec<u8>, Self::Error>
fn encode<R: Serialize + DeserializeOwned>( &self, records: &[R], ) -> Result<Vec<u8>, Self::Error>
§Errors
Returns an error if schema derivation, record batch construction, or parquet writing fails.
Source§const EXT: &'static str = "parquet"
const EXT: &'static str = "parquet"
File extension (no leading dot) for files this encoder produces,
e.g.
"parquet".Source§type Error = ParquetEncodeError
type Error = ParquetEncodeError
Error produced when encoding fails.
Auto Trait Implementations§
impl<C> Freeze for ParquetEncoder<C>
impl<C> RefUnwindSafe for ParquetEncoder<C>where
C: RefUnwindSafe,
impl<C> Send for ParquetEncoder<C>where
C: Send,
impl<C> Sync for ParquetEncoder<C>where
C: Sync,
impl<C> Unpin for ParquetEncoder<C>where
C: Unpin,
impl<C> UnsafeUnpin for ParquetEncoder<C>
impl<C> UnwindSafe for ParquetEncoder<C>where
C: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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