pub struct FileCompressionType { /* private fields */ }
Expand description
Readable file compression type
Implementations§
Source§impl FileCompressionType
FileCompressionType
implementation
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 fn get_variant(&self) -> &CompressionTypeVariant
pub fn get_variant(&self) -> &CompressionTypeVariant
Read only access to self.variant
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<'a>(
&self,
s: Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send + 'a>>,
) -> Result<Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send + 'a>>, DataFusionError>
pub fn convert_to_compress_stream<'a>( &self, s: Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send + 'a>>, ) -> Result<Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send + 'a>>, 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<'a>(
&self,
s: Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send + 'a>>,
) -> Result<Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send + 'a>>, DataFusionError>
pub fn convert_stream<'a>( &self, s: Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send + 'a>>, ) -> Result<Pin<Box<dyn Stream<Item = Result<Bytes, DataFusionError>> + Send + 'a>>, 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
Source§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
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> AsAny for T
impl<T> AsAny for T
Source§fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
Obtains a
dyn Any
reference to the object: Read moreSource§fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
Obtains an
Arc<dyn Any>
reference to the object: Read moreSource§fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
Converts the object to
Box<dyn Any>
: Read moreSource§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Convenient wrapper for
std::any::type_name
, since Any
does not provide it and
Any::type_id
is useless as a debugging aid (its Debug
is just a mess of hex digits).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§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.