arrow_tiberius/arrow/
field.rs1use arrow_schema::DataType;
4
5#[derive(Debug, Clone, PartialEq, Eq)]
10pub struct ArrowFieldRef {
11 index: usize,
12 name: String,
13 nullable: bool,
14 data_type: DataType,
15}
16
17impl ArrowFieldRef {
18 pub const fn new(index: usize, name: String, nullable: bool, data_type: DataType) -> Self {
20 Self {
21 index,
22 name,
23 nullable,
24 data_type,
25 }
26 }
27
28 pub const fn index(&self) -> usize {
30 self.index
31 }
32
33 pub fn name(&self) -> &str {
35 &self.name
36 }
37
38 pub const fn nullable(&self) -> bool {
40 self.nullable
41 }
42
43 pub const fn data_type(&self) -> &DataType {
45 &self.data_type
46 }
47}