1use vortex_array::{VTableContext, VTableRegistry};
2
3use crate::layouts::chunked::ChunkedLayout;
4use crate::layouts::flat::FlatLayout;
5use crate::layouts::stats::StatsLayout;
6use crate::layouts::struct_::StructLayout;
7use crate::vtable::LayoutVTableRef;
8
9pub type LayoutContext = VTableContext<LayoutVTableRef>;
10pub type LayoutRegistry = VTableRegistry<LayoutVTableRef>;
11
12pub trait LayoutRegistryExt {
13 fn default() -> Self;
14}
15
16impl LayoutRegistryExt for LayoutRegistry {
17 fn default() -> Self {
18 let mut this = Self::empty();
19 this.register_many([
20 LayoutVTableRef::new_ref(&ChunkedLayout),
21 LayoutVTableRef::new_ref(&FlatLayout),
22 LayoutVTableRef::new_ref(&StructLayout),
23 LayoutVTableRef::new_ref(&StatsLayout),
24 ]);
25 this
26 }
27}