[−][src]Struct polars::prelude::Field
Contains the meta-data for a single relative type.
The Schema
object is an ordered collection of Field
objects.
Implementations
impl Field
[src]
pub fn new(name: &str, data_type: DataType, nullable: bool) -> Field
[src]
Creates a new field
pub fn new_dict(
name: &str,
data_type: DataType,
nullable: bool,
dict_id: i64,
dict_is_ordered: bool
) -> Field
[src]
name: &str,
data_type: DataType,
nullable: bool,
dict_id: i64,
dict_is_ordered: bool
) -> Field
Creates a new field
pub fn name(&self) -> &String
[src]
Returns an immutable reference to the Field
's name
pub fn data_type(&self) -> &DataType
[src]
Returns an immutable reference to the Field
's data-type
pub fn is_nullable(&self) -> bool
[src]
Indicates whether this Field
supports null values
pub fn from(json: &Value) -> Result<Field, ArrowError>
[src]
Parse a Field
definition from a JSON representation
pub fn to_json(&self) -> Value
[src]
Generate a JSON representation of the Field
pub fn try_merge(&mut self, from: &Field) -> Result<(), ArrowError>
[src]
Merge field into self if it is compatible. Struct will be merged recursively.
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 Clone for Field
[src]
impl Debug for Field
[src]
impl<'de> Deserialize<'de> for Field
[src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Field, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Field, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Display for Field
[src]
impl Eq for Field
[src]
impl<'a> From<Field<'a>> for Field
[src]
Convert an IPC Field to Arrow Field
impl Hash for Field
[src]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Field
[src]
pub fn cmp(&self, other: &Field) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Field> for Field
[src]
impl PartialOrd<Field> for Field
[src]
pub fn partial_cmp(&self, other: &Field) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Field) -> bool
[src]
pub fn le(&self, other: &Field) -> bool
[src]
pub fn gt(&self, other: &Field) -> bool
[src]
pub fn ge(&self, other: &Field) -> bool
[src]
impl Serialize for Field
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl StructuralEq for Field
[src]
impl StructuralPartialEq for Field
[src]
Auto Trait Implementations
impl RefUnwindSafe for Field
[src]
impl Send for Field
[src]
impl Sync for Field
[src]
impl Unpin for Field
[src]
impl UnwindSafe for Field
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CallHasher for T where
T: Hash + ?Sized,
[src]
T: Hash + ?Sized,
impl<T, U> Cast<U> for T where
U: FromCast<T>,
U: FromCast<T>,
pub fn cast(self) -> U
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> FromCast<T> for T
pub fn from_cast(t: T) -> T
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToCell for T where
T: ToString,
[src]
T: ToString,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,