pub struct Field { /* private fields */ }
Expand description
Contains the meta-data for a single relative type.
The Schema
object is an ordered collection of Field
objects.
Implementations
Creates a new field
Sets the Field
’s optional custom metadata.
The metadata is set as None
for empty map.
Sets the metadata of this Field
to be metadata
and returns self
Returns the immutable reference to the Field
’s optional custom metadata.
Returns an immutable reference to the Field
’s data-type.
Indicates whether this Field
supports null values.
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 arrow::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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Convert an IPC Field to Arrow Field
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
type Error = ArrowError
type Error = ArrowError
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Field
impl UnwindSafe for Field
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.