pub struct Opaque(/* private fields */);Expand description
The extension type for Opaque.
Extension name: arrow.opaque.
Opaque represents a type that an Arrow-based system received from an external (often non-Arrow) system, but that it cannot interpret. In this case, it can pass on Opaque to its clients to at least show that a field exists and preserve metadata about the type from the other system.
The storage type of this extension is any type. If there is no underlying data, the storage type should be Null.
Implementations§
Source§impl Opaque
impl Opaque
Sourcepub fn new(type_name: impl Into<String>, vendor_name: impl Into<String>) -> Self
Available on crate feature canonical_extension_types only.
pub fn new(type_name: impl Into<String>, vendor_name: impl Into<String>) -> Self
canonical_extension_types only.Returns a new Opaque extension type.
Sourcepub fn type_name(&self) -> &str
Available on crate feature canonical_extension_types only.
pub fn type_name(&self) -> &str
canonical_extension_types only.Returns the name of the unknown type in the external system.
Sourcepub fn vendor_name(&self) -> &str
Available on crate feature canonical_extension_types only.
pub fn vendor_name(&self) -> &str
canonical_extension_types only.Returns the name of the external system.
Trait Implementations§
Source§impl ExtensionType for Opaque
Available on crate feature canonical_extension_types only.
impl ExtensionType for Opaque
Available on crate feature
canonical_extension_types only.Source§type Metadata = OpaqueMetadata
type Metadata = OpaqueMetadata
The metadata type of 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§impl From<Opaque> for CanonicalExtensionType
Available on crate feature canonical_extension_types only.
impl From<Opaque> for CanonicalExtensionType
Available on crate feature
canonical_extension_types only.Source§impl From<OpaqueMetadata> for Opaque
Available on crate feature canonical_extension_types only.
impl From<OpaqueMetadata> for Opaque
Available on crate feature
canonical_extension_types only.Source§fn from(value: OpaqueMetadata) -> Self
fn from(value: OpaqueMetadata) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Opaque
Available on crate feature
canonical_extension_types only.Auto Trait Implementations§
impl Freeze for Opaque
impl RefUnwindSafe for Opaque
impl Send for Opaque
impl Sync for Opaque
impl Unpin for Opaque
impl UnwindSafe for Opaque
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