Struct arrow::datatypes::Field [−][src]
pub struct Field { /* fields omitted */ }
Expand description
Contains the meta-data for a single relative type.
The Schema
object is an ordered collection of Field
objects.
Implementations
impl Field
[src]
impl Field
[src]pub fn new_dict(
name: &str,
data_type: DataType,
nullable: bool,
dict_id: i64,
dict_is_ordered: bool
) -> Self
[src]
pub fn new_dict(
name: &str,
data_type: DataType,
nullable: bool,
dict_id: i64,
dict_is_ordered: bool
) -> Self
[src]Creates a new field
pub fn set_metadata(&mut self, metadata: Option<BTreeMap<String, String>>)
[src]
pub fn set_metadata(&mut self, metadata: Option<BTreeMap<String, String>>)
[src]Sets the Field
’s optional custom metadata.
The metadata is set as None
for empty map.
pub const fn metadata(&self) -> &Option<BTreeMap<String, String>>
[src]
pub const fn metadata(&self) -> &Option<BTreeMap<String, String>>
[src]Returns the immutable reference to the Field
’s optional custom metadata.
pub const fn data_type(&self) -> &DataType
[src]
pub const fn data_type(&self) -> &DataType
[src]Returns an immutable reference to the Field
’s data-type.
pub const fn is_nullable(&self) -> bool
[src]
pub const fn is_nullable(&self) -> bool
[src]Indicates whether this Field
supports null values.
pub const fn dict_id(&self) -> Option<i64>
[src]
pub const fn dict_id(&self) -> Option<i64>
[src]Returns the dictionary ID, if this is a dictionary type.
pub const fn dict_is_ordered(&self) -> Option<bool>
[src]
pub const fn dict_is_ordered(&self) -> Option<bool>
[src]Returns whether this Field
’s dictionary is ordered, if this is a dictionary type.
pub fn try_merge(&mut self, from: &Field) -> Result<()>
[src]
pub fn try_merge(&mut self, from: &Field) -> Result<()>
[src]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
impl<'de> Deserialize<'de> for Field
[src]
impl<'de> Deserialize<'de> for Field
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl From<&'_ Field> for ArrowJsonField
[src]
impl From<&'_ Field> for ArrowJsonField
[src]impl Ord for Field
[src]
impl Ord for Field
[src]impl PartialOrd<Field> for Field
[src]
impl PartialOrd<Field> for Field
[src]fn partial_cmp(&self, other: &Field) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Field) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Field
[src]
impl StructuralEq for Field
[src]
impl StructuralPartialEq for Field
[src]
Auto Trait Implementations
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,