pub struct Layout<'a> {
pub _tab: Table<'a>,
}Expand description
A Layout is a recursive data structure describing the physical layout of Vortex arrays in random access storage.
As a starting, concrete example, the first three Layout encodings are defined as:
- encoding == 1,
Flat-> one buffer, zero child Layouts - encoding == 2,
Chunked-> zero buffers, one or more child Layouts (used for chunks of rows) - encoding == 3,
Columnar-> zero buffers, one or more child Layouts (used for columns of structs)
The row_count represents the number of rows represented by this Layout. This is very useful for
pruning the Layout tree based on row filters.
The metadata field is fully opaque at this layer, and allows the Layout implementation corresponding to
encoding to embed additional information that may be useful for the reader. For example, the ChunkedLayout
uses the first byte of the metadata array as a boolean to indicate whether the first child Layout represents
the statistics table for the other chunks.
Fields§
§_tab: Table<'a>Implementations§
Source§impl<'a> Layout<'a>
impl<'a> Layout<'a>
pub const VT_ENCODING: VOffsetT = 4u16
pub const VT_ROW_COUNT: VOffsetT = 6u16
pub const VT_METADATA: VOffsetT = 8u16
pub const VT_CHILDREN: VOffsetT = 10u16
pub const VT_SEGMENTS: VOffsetT = 12u16
pub unsafe fn init_from_table(table: Table<'a>) -> Self
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: Allocator + 'bldr>( _fbb: &'mut_bldr mut FlatBufferBuilder<'bldr, A>, args: &'args LayoutArgs<'args>, ) -> WIPOffset<Layout<'bldr>>
Sourcepub fn metadata(&self) -> Option<Vector<'a, u8>>
pub fn metadata(&self) -> Option<Vector<'a, u8>>
Any additional metadata this layout needs to interpret its children. This does not include data-specific metadata, which the layout should store in a segment.
Trait Implementations§
Source§impl Verifiable for Layout<'_>
impl Verifiable for Layout<'_>
Source§fn run_verifier(
v: &mut Verifier<'_, '_>,
pos: usize,
) -> Result<(), InvalidFlatbuffer>
fn run_verifier( v: &mut Verifier<'_, '_>, pos: usize, ) -> Result<(), InvalidFlatbuffer>
pos in the verifier’s buffer.
Should not need to be called directly.impl<'a> Copy for Layout<'a>
impl<'a> StructuralPartialEq for Layout<'a>
Auto Trait Implementations§
impl<'a> Freeze for Layout<'a>
impl<'a> RefUnwindSafe for Layout<'a>
impl<'a> Send for Layout<'a>
impl<'a> Sync for Layout<'a>
impl<'a> Unpin for Layout<'a>
impl<'a> UnwindSafe for Layout<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more