pub struct VariantType;Expand description
Arrow Variant ExtensionType.
Represents the canonical Arrow Extension Type for storing variants.
See VariantArray in the parquet-variant-compute crate for more examples
of using this extension type.
Trait Implementations§
Source§impl Clone for VariantType
impl Clone for VariantType
Source§impl Debug for VariantType
impl Debug for VariantType
Source§impl ExtensionType for VariantType
impl ExtensionType for VariantType
Source§const NAME: &'static str = "arrow.parquet.variant"
const NAME: &'static str = "arrow.parquet.variant"
The name identifying this extension type. Read more
Source§fn metadata(&self) -> &Self::Metadata
fn metadata(&self) -> &Self::Metadata
Returns a reference to the metadata of this extension type, or
&() if
if this extension type defines no metadata (Self::Metadata=()).Source§fn serialize_metadata(&self) -> Option<String>
fn serialize_metadata(&self) -> Option<String>
Returns the serialized representation of the metadata of this extension
type, or
None if this extension type defines no metadata
(Self::Metadata=()). Read moreSource§fn deserialize_metadata(
_metadata: Option<&str>,
) -> Result<Self::Metadata, ArrowError>
fn deserialize_metadata( _metadata: Option<&str>, ) -> Result<Self::Metadata, ArrowError>
Deserialize the metadata of this extension type from the serialized
representation of the metadata. An extension type that defines no
metadata should expect
None for the serialized metadata and return
Ok(()). Read moreSource§fn supports_data_type(&self, data_type: &DataType) -> Result<(), ArrowError>
fn supports_data_type(&self, data_type: &DataType) -> Result<(), ArrowError>
Returns
Ok(()) iff the given data type is supported by this extension
type.Source§fn try_new(
data_type: &DataType,
_metadata: Self::Metadata,
) -> Result<Self, ArrowError>
fn try_new( data_type: &DataType, _metadata: Self::Metadata, ) -> Result<Self, ArrowError>
Construct this extension type for a field with the given data type and
metadata. Read more
Source§fn validate(
data_type: &DataType,
_metadata: Self::Metadata,
) -> Result<(), ArrowError>
fn validate( data_type: &DataType, _metadata: Self::Metadata, ) -> Result<(), ArrowError>
Validate this extension type for a field with the given data type and
metadata. Read more
Source§fn try_new_from_field_metadata(
data_type: &DataType,
metadata: &Metadata,
) -> Result<Self, ArrowError>
fn try_new_from_field_metadata( data_type: &DataType, metadata: &Metadata, ) -> Result<Self, ArrowError>
Construct this extension type from field metadata and data type. Read more
Source§impl From<VariantType> for CanonicalExtensionType
impl From<VariantType> for CanonicalExtensionType
Source§fn from(value: VariantType) -> Self
fn from(value: VariantType) -> Self
Converts to this type from the input type.
Source§impl PartialEq for VariantType
impl PartialEq for VariantType
impl StructuralPartialEq for VariantType
Auto Trait Implementations§
impl Forget for VariantType
impl Freeze for VariantType
impl RefUnwindSafe for VariantType
impl Send for VariantType
impl Sync for VariantType
impl Unpin for VariantType
impl UnsafeUnpin for VariantType
impl UnwindSafe for VariantType
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