pub struct Field {
pub name: Option<String>,
pub nullable: bool,
pub type_: Option<Type>,
pub dictionary: Option<Box<DictionaryEncoding>>,
pub children: Option<Vec<Field>>,
pub custom_metadata: Option<Vec<KeyValue>>,
}Expand description
A field represents a named column in a record / row batch or child of a nested type.
Generated from these locations:
- Table
Fieldin the fileSchema.fbs:512
Fields§
§name: Option<String>Name is not required (e.g., in a List)
nullable: boolWhether or not this field can contain nulls. Should be true in general.
type_: Option<Type>This is the type of the decoded value if the field is dictionary encoded.
dictionary: Option<Box<DictionaryEncoding>>Present only if the field is dictionary encoded.
children: Option<Vec<Field>>children apply only to nested data types like Struct, List and Union. For primitive types children will have length 0.
custom_metadata: Option<Vec<KeyValue>>User-defined metadata
Implementations§
Source§impl Field
impl Field
Sourcepub fn builder() -> FieldBuilder<()>
pub fn builder() -> FieldBuilder<()>
Creates a FieldBuilder for serializing an instance of this table.
pub fn create( builder: &mut Builder, field_name: impl WriteAsOptional<Offset<str>>, field_nullable: impl WriteAsDefault<bool, bool>, field_type_: impl WriteAsOptionalUnion<Type>, field_dictionary: impl WriteAsOptional<Offset<DictionaryEncoding>>, field_children: impl WriteAsOptional<Offset<[Offset<Field>]>>, field_custom_metadata: impl WriteAsOptional<Offset<[Offset<KeyValue>]>>, ) -> Offset<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Field
impl<'de> Deserialize<'de> for Field
Source§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
Source§impl Ord for Field
impl Ord for Field
Source§impl PartialOrd for Field
impl PartialOrd for Field
impl Eq for Field
impl StructuralPartialEq for Field
impl VectorWrite<Offset<Field>> for Field
§Safety
The planus compiler generates implementations that initialize
the bytes in write_values.
impl WriteAs<Offset<Field>> for Field
impl WriteAsOffset<Field> for Field
impl<T0: WriteAsOptional<Offset<str>>, T1: WriteAsDefault<bool, bool>, T2: WriteAsOptionalUnion<Type>, T3: WriteAsOptional<Offset<DictionaryEncoding>>, T4: WriteAsOptional<Offset<[Offset<Field>]>>, T5: WriteAsOptional<Offset<[Offset<KeyValue>]>>> WriteAsOffset<Field> for FieldBuilder<(T0, T1, T2, T3, T4, T5)>
impl WriteAsOptional<Offset<Field>> for Field
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more