Struct deltalake::datafusion::datasource::file_format::file_compression_type::FileCompressionType
source · pub struct FileCompressionType { /* private fields */ }
Expand description
Readable file compression type
Implementations§
source§impl FileCompressionType
impl FileCompressionType
FileCompressionType
implementation
sourcepub const GZIP: FileCompressionType = _
pub const GZIP: FileCompressionType = _
Gzip-ed file
sourcepub const BZIP2: FileCompressionType = _
pub const BZIP2: FileCompressionType = _
Bzip2-ed file
sourcepub const XZ: FileCompressionType = _
pub const XZ: FileCompressionType = _
Xz-ed file (liblzma)
sourcepub const ZSTD: FileCompressionType = _
pub const ZSTD: FileCompressionType = _
Zstd-ed file
sourcepub const UNCOMPRESSED: FileCompressionType = _
pub const UNCOMPRESSED: FileCompressionType = _
Uncompressed file
sourcepub const fn is_compressed(&self) -> bool
pub const fn is_compressed(&self) -> bool
The file is compressed or not
sourcepub fn convert_to_compress_stream(
&self,
s: Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send>>
) -> Result<Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send>>, DataFusionError>
pub fn convert_to_compress_stream( &self, s: Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send>> ) -> Result<Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send>>, DataFusionError>
Given a Stream
, create a Stream
which data are compressed with FileCompressionType
.
sourcepub fn convert_async_writer(
&self,
w: BufWriter
) -> Result<Box<dyn AsyncWrite + Unpin + Send>, DataFusionError>
pub fn convert_async_writer( &self, w: BufWriter ) -> Result<Box<dyn AsyncWrite + Unpin + Send>, DataFusionError>
Wrap the given BufWriter
so that it performs compressed writes
according to this FileCompressionType
.
sourcepub fn convert_stream(
&self,
s: Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send>>
) -> Result<Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send>>, DataFusionError>
pub fn convert_stream( &self, s: Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send>> ) -> Result<Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send>>, DataFusionError>
Given a Stream
, create a Stream
which data are decompressed with FileCompressionType
.
sourcepub fn convert_read<T>(
&self,
r: T
) -> Result<Box<dyn Read + Send>, DataFusionError>
pub fn convert_read<T>( &self, r: T ) -> Result<Box<dyn Read + Send>, DataFusionError>
Given a Read
, create a Read
which data are decompressed with FileCompressionType
.
Trait Implementations§
source§impl Clone for FileCompressionType
impl Clone for FileCompressionType
source§fn clone(&self) -> FileCompressionType
fn clone(&self) -> FileCompressionType
Returns a copy of the value. Read more
1.0.0 · 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 FileCompressionType
impl Debug for FileCompressionType
source§impl From<CompressionTypeVariant> for FileCompressionType
impl From<CompressionTypeVariant> for FileCompressionType
source§fn from(t: CompressionTypeVariant) -> FileCompressionType
fn from(t: CompressionTypeVariant) -> FileCompressionType
Converts to this type from the input type.
source§impl From<FileCompressionType> for CompressionTypeVariant
impl From<FileCompressionType> for CompressionTypeVariant
source§fn from(t: FileCompressionType) -> CompressionTypeVariant
fn from(t: FileCompressionType) -> CompressionTypeVariant
Converts to this type from the input type.
source§impl FromStr for FileCompressionType
impl FromStr for FileCompressionType
§type Err = DataFusionError
type Err = DataFusionError
The associated error which can be returned from parsing.
source§fn from_str(s: &str) -> Result<FileCompressionType, DataFusionError>
fn from_str(s: &str) -> Result<FileCompressionType, DataFusionError>
Parses a string
s
to return a value of this type. Read moresource§impl PartialEq for FileCompressionType
impl PartialEq for FileCompressionType
source§fn eq(&self, other: &FileCompressionType) -> bool
fn eq(&self, other: &FileCompressionType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for FileCompressionType
impl Eq for FileCompressionType
impl StructuralPartialEq for FileCompressionType
Auto Trait Implementations§
impl Freeze for FileCompressionType
impl RefUnwindSafe for FileCompressionType
impl Send for FileCompressionType
impl Sync for FileCompressionType
impl Unpin for FileCompressionType
impl UnwindSafe for FileCompressionType
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<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.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.