Skip to main content

reifydb_core/interface/catalog/
layout.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2025 ReifyDB
3
4use super::{ringbuffer::RingBuffer, table::Table, view::View};
5use crate::encoded::shape::RowShape;
6
7pub trait GetShape {
8	fn get_shape(&self) -> RowShape;
9}
10
11impl GetShape for Table {
12	fn get_shape(&self) -> RowShape {
13		RowShape::from(&self.columns)
14	}
15}
16
17impl GetShape for View {
18	fn get_shape(&self) -> RowShape {
19		RowShape::from(self.columns())
20	}
21}
22
23impl GetShape for RingBuffer {
24	fn get_shape(&self) -> RowShape {
25		RowShape::from(&self.columns)
26	}
27}