hydrate_schema/schema/
static_array.rs

1use super::Schema;
2
3#[derive(Clone, Debug, PartialEq)]
4pub struct SchemaStaticArray {
5    pub(crate) item_type: Box<Schema>,
6    pub(crate) length: usize,
7}
8
9impl SchemaStaticArray {
10    pub(crate) fn new(
11        item_type: Box<Schema>,
12        length: usize,
13    ) -> Self {
14        SchemaStaticArray { item_type, length }
15    }
16
17    pub fn item_type(&self) -> &Schema {
18        &*self.item_type
19    }
20
21    pub fn length(&self) -> usize {
22        self.length
23    }
24}