Struct polars_core::prelude::ArrowField[][src]

pub struct ArrowField {
    pub name: String,
    pub data_type: DataType,
    pub nullable: bool,
    pub dict_id: i64,
    pub dict_is_ordered: bool,
    pub metadata: Option<BTreeMap<String, String>>,
}
Expand description

A logical DataType and its associated metadata per Arrow specification

Fields

name: String

Its name

data_type: DataType

Its logical DataType

nullable: bool

Whether its values can be null or not

dict_id: i64

The dictionary id of this field (currently un-used)

dict_is_ordered: bool

Whether the dictionary’s values are ordered

metadata: Option<BTreeMap<String, String>>

A map of key-value pairs containing additional custom meta data.

Implementations

Creates a new field

Creates a new field

Creates a new Field with metadata.

Sets the Field’s optional metadata. The metadata is set as None for empty map.

Returns the Field’s optional custom metadata.

Returns the Field’s name.

Returns the Field’s DataType.

Returns the Field nullability.

Returns the dictionary ID, if this is a dictionary type.

Returns whether this Field’s dictionary is ordered, if this is a dictionary type.

Merge field into self if it is compatible. Struct will be merged recursively. NOTE: self may be updated to unexpected state in case of merge failure.

Example:

use arrow2::datatypes::*;

let mut field = Field::new("c1", DataType::Int64, false);
assert!(field.try_merge(&Field::new("c1", DataType::Int64, true)).is_ok());
assert!(field.is_nullable());

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.