pub struct DFBool8(/* private fields */);Expand description
Defines the extension type logic for the canonical arrow.bool8 extension type. This extension
type allows storing a Boolean value in a single byte, instead of a single bit.
See DFExtensionType for information on DataFusion’s extension type mechanism. See also
Bool8 for the implementation of arrow-rs, which this type uses internally.
https://arrow.apache.org/docs/format/CanonicalExtensions.html#bit-boolean
Implementations§
Source§impl DFBool8
impl DFBool8
Sourcepub fn try_new(
data_type: &DataType,
metadata: <Bool8 as ExtensionType>::Metadata,
) -> Result<Self>
pub fn try_new( data_type: &DataType, metadata: <Bool8 as ExtensionType>::Metadata, ) -> Result<Self>
Creates a new DFBool8, validating that the storage type is compatible with the
extension type.
Even though DFBool8 only supports a single storage type (DataType::Int8), passing-in
the storage type allows conveniently validating whether this extension type is compatible
with a given DataType.
Trait Implementations§
Source§impl DFExtensionType for DFBool8
impl DFExtensionType for DFBool8
Source§fn storage_type(&self) -> DataType
fn storage_type(&self) -> DataType
Returns the underlying storage type.
Source§fn serialize_metadata(&self) -> Option<String>
fn serialize_metadata(&self) -> Option<String>
Returns the serialized metadata.
Source§fn create_array_formatter<'fmt>(
&self,
array: &'fmt dyn Array,
options: &FormatOptions<'fmt>,
) -> Result<Option<ArrayFormatter<'fmt>>>
fn create_array_formatter<'fmt>( &self, array: &'fmt dyn Array, options: &FormatOptions<'fmt>, ) -> Result<Option<ArrayFormatter<'fmt>>>
Returns an
ArrayFormatter that can format values of this type. Read moreAuto Trait Implementations§
impl Freeze for DFBool8
impl RefUnwindSafe for DFBool8
impl Send for DFBool8
impl Sync for DFBool8
impl Unpin for DFBool8
impl UnsafeUnpin for DFBool8
impl UnwindSafe for DFBool8
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