pub struct Field<'a> {
pub _tab: Table<'a>,
}
Expand description
A field represents a named column in a record / row batch or child of a nested type.
Fields§
§_tab: Table<'a>
Implementations§
source§impl<'a> Field<'a>
impl<'a> Field<'a>
pub const VT_NAME: VOffsetT = 4u16
pub const VT_NULLABLE: VOffsetT = 6u16
pub const VT_TYPE_TYPE: VOffsetT = 8u16
pub const VT_TYPE_: VOffsetT = 10u16
pub const VT_DICTIONARY: VOffsetT = 12u16
pub const VT_CHILDREN: VOffsetT = 14u16
pub const VT_CUSTOM_METADATA: VOffsetT = 16u16
pub unsafe fn init_from_table(table: Table<'a>) -> Self
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( _fbb: &'mut_bldr mut FlatBufferBuilder<'bldr>, args: &'args FieldArgs<'args> ) -> WIPOffset<Field<'bldr>>
sourcepub fn nullable(&self) -> bool
pub fn nullable(&self) -> bool
Whether or not this field can contain nulls. Should be true in general.
pub fn type_type(&self) -> Type
sourcepub fn type_(&self) -> Option<Table<'a>>
pub fn type_(&self) -> Option<Table<'a>>
This is the type of the decoded value if the field is dictionary encoded.
sourcepub fn dictionary(&self) -> Option<DictionaryEncoding<'a>>
pub fn dictionary(&self) -> Option<DictionaryEncoding<'a>>
Present only if the field is dictionary encoded.
sourcepub fn children(&self) -> Option<Vector<'a, ForwardsUOffset<Field<'a>>>>
pub fn children(&self) -> Option<Vector<'a, ForwardsUOffset<Field<'a>>>>
children apply only to nested data types like Struct, List and Union. For primitive types children will have length 0.
sourcepub fn custom_metadata(
&self
) -> Option<Vector<'a, ForwardsUOffset<KeyValue<'a>>>>
pub fn custom_metadata( &self ) -> Option<Vector<'a, ForwardsUOffset<KeyValue<'a>>>>
User-defined metadata
pub fn type_as_null(&self) -> Option<Null<'a>>
pub fn type_as_int(&self) -> Option<Int<'a>>
pub fn type_as_floating_point(&self) -> Option<FloatingPoint<'a>>
pub fn type_as_binary(&self) -> Option<Binary<'a>>
pub fn type_as_utf_8(&self) -> Option<Utf8<'a>>
pub fn type_as_bool(&self) -> Option<Bool<'a>>
pub fn type_as_decimal(&self) -> Option<Decimal<'a>>
pub fn type_as_date(&self) -> Option<Date<'a>>
pub fn type_as_time(&self) -> Option<Time<'a>>
pub fn type_as_timestamp(&self) -> Option<Timestamp<'a>>
pub fn type_as_interval(&self) -> Option<Interval<'a>>
pub fn type_as_list(&self) -> Option<List<'a>>
pub fn type_as_struct_(&self) -> Option<Struct_<'a>>
pub fn type_as_union(&self) -> Option<Union<'a>>
pub fn type_as_fixed_size_binary(&self) -> Option<FixedSizeBinary<'a>>
pub fn type_as_fixed_size_list(&self) -> Option<FixedSizeList<'a>>
pub fn type_as_map(&self) -> Option<Map<'a>>
pub fn type_as_duration(&self) -> Option<Duration<'a>>
pub fn type_as_large_binary(&self) -> Option<LargeBinary<'a>>
pub fn type_as_large_utf_8(&self) -> Option<LargeUtf8<'a>>
pub fn type_as_large_list(&self) -> Option<LargeList<'a>>
pub fn type_as_run_end_encoded(&self) -> Option<RunEndEncoded<'a>>
Trait Implementations§
source§impl<'a> PartialEq<Field<'a>> for Field<'a>
impl<'a> PartialEq<Field<'a>> for Field<'a>
source§impl Verifiable for Field<'_>
impl Verifiable for Field<'_>
source§fn run_verifier(
v: &mut Verifier<'_, '_>,
pos: usize
) -> Result<(), InvalidFlatbuffer>
fn run_verifier( v: &mut Verifier<'_, '_>, pos: usize ) -> Result<(), InvalidFlatbuffer>
Runs the verifier for this type, assuming its at position
pos
in the verifier’s buffer.
Should not need to be called directly.impl<'a> Copy for Field<'a>
impl<'a> StructuralPartialEq for Field<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Field<'a>
impl<'a> Send for Field<'a>
impl<'a> Sync for Field<'a>
impl<'a> Unpin for Field<'a>
impl<'a> UnwindSafe for Field<'a>
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