Struct arrow_schema::ffi::FFI_ArrowSchema
source · #[repr(C)]pub struct FFI_ArrowSchema { /* private fields */ }
Expand description
ABI-compatible struct for ArrowSchema
from C Data Interface
See https://arrow.apache.org/docs/format/CDataInterface.html#structure-definitions
fn array_schema(data_type: &DataType) -> FFI_ArrowSchema {
FFI_ArrowSchema::try_from(data_type).unwrap()
}
Implementations§
source§impl FFI_ArrowSchema
impl FFI_ArrowSchema
sourcepub fn try_new(
format: &str,
children: Vec<FFI_ArrowSchema>,
dictionary: Option<FFI_ArrowSchema>
) -> Result<Self, ArrowError>
pub fn try_new( format: &str, children: Vec<FFI_ArrowSchema>, dictionary: Option<FFI_ArrowSchema> ) -> Result<Self, ArrowError>
create a new FFI_ArrowSchema
. This fails if the fields’
DataType
is not supported.
pub fn with_name(self, name: &str) -> Result<Self, ArrowError>
pub fn with_flags(self, flags: Flags) -> Result<Self, ArrowError>
pub fn with_metadata<I, S>(self, metadata: I) -> Result<Self, ArrowError>where I: IntoIterator<Item = (S, S)>, S: AsRef<str>,
pub fn empty() -> Self
pub fn flags(&self) -> Option<Flags>
pub fn child(&self, index: usize) -> &Self
pub fn children(&self) -> impl Iterator<Item = &Self>
pub fn nullable(&self) -> bool
pub fn dictionary(&self) -> Option<&Self>
pub fn map_keys_sorted(&self) -> bool
pub fn dictionary_ordered(&self) -> bool
pub fn metadata(&self) -> Result<HashMap<String, String>, ArrowError>
Trait Implementations§
source§impl Debug for FFI_ArrowSchema
impl Debug for FFI_ArrowSchema
source§impl Drop for FFI_ArrowSchema
impl Drop for FFI_ArrowSchema
source§impl TryFrom<&DataType> for FFI_ArrowSchema
impl TryFrom<&DataType> for FFI_ArrowSchema
§type Error = ArrowError
type Error = ArrowError
The type returned in the event of a conversion error.
source§impl TryFrom<&FFI_ArrowSchema> for DataType
impl TryFrom<&FFI_ArrowSchema> for DataType
source§fn try_from(c_schema: &FFI_ArrowSchema) -> Result<Self, ArrowError>
fn try_from(c_schema: &FFI_ArrowSchema) -> Result<Self, ArrowError>
§type Error = ArrowError
type Error = ArrowError
The type returned in the event of a conversion error.
source§impl TryFrom<&FFI_ArrowSchema> for Field
impl TryFrom<&FFI_ArrowSchema> for Field
§type Error = ArrowError
type Error = ArrowError
The type returned in the event of a conversion error.
source§fn try_from(c_schema: &FFI_ArrowSchema) -> Result<Self, ArrowError>
fn try_from(c_schema: &FFI_ArrowSchema) -> Result<Self, ArrowError>
Performs the conversion.
source§impl TryFrom<&FFI_ArrowSchema> for Schema
impl TryFrom<&FFI_ArrowSchema> for Schema
§type Error = ArrowError
type Error = ArrowError
The type returned in the event of a conversion error.
source§fn try_from(c_schema: &FFI_ArrowSchema) -> Result<Self, ArrowError>
fn try_from(c_schema: &FFI_ArrowSchema) -> Result<Self, ArrowError>
Performs the conversion.
source§impl TryFrom<&Field> for FFI_ArrowSchema
impl TryFrom<&Field> for FFI_ArrowSchema
§type Error = ArrowError
type Error = ArrowError
The type returned in the event of a conversion error.
source§impl TryFrom<&Schema> for FFI_ArrowSchema
impl TryFrom<&Schema> for FFI_ArrowSchema
§type Error = ArrowError
type Error = ArrowError
The type returned in the event of a conversion error.
source§impl TryFrom<DataType> for FFI_ArrowSchema
impl TryFrom<DataType> for FFI_ArrowSchema
§type Error = ArrowError
type Error = ArrowError
The type returned in the event of a conversion error.
source§impl TryFrom<Field> for FFI_ArrowSchema
impl TryFrom<Field> for FFI_ArrowSchema
§type Error = ArrowError
type Error = ArrowError
The type returned in the event of a conversion error.
source§impl TryFrom<Schema> for FFI_ArrowSchema
impl TryFrom<Schema> for FFI_ArrowSchema
§type Error = ArrowError
type Error = ArrowError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl RefUnwindSafe for FFI_ArrowSchema
impl !Send for FFI_ArrowSchema
impl !Sync for FFI_ArrowSchema
impl Unpin for FFI_ArrowSchema
impl UnwindSafe for FFI_ArrowSchema
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