pub struct LayoutData(/* private fields */);Expand description
LayoutData is the lazy equivalent to vortex_array::ArrayData, providing a hierarchical
structure.
Implementations§
Source§impl LayoutData
impl LayoutData
Sourcepub fn new_owned(
encoding: LayoutEncodingRef,
dtype: DType,
row_count: u64,
segments: Option<Vec<SegmentId>>,
children: Option<Vec<LayoutData>>,
metadata: Option<Bytes>,
) -> Self
pub fn new_owned( encoding: LayoutEncodingRef, dtype: DType, row_count: u64, segments: Option<Vec<SegmentId>>, children: Option<Vec<LayoutData>>, metadata: Option<Bytes>, ) -> Self
Create a new owned layout.
Sourcepub fn try_new_viewed(
encoding: LayoutEncodingRef,
dtype: DType,
flatbuffer: ByteBuffer,
flatbuffer_loc: usize,
ctx: LayoutContextRef,
) -> VortexResult<Self>
pub fn try_new_viewed( encoding: LayoutEncodingRef, dtype: DType, flatbuffer: ByteBuffer, flatbuffer_loc: usize, ctx: LayoutContextRef, ) -> VortexResult<Self>
Create a new viewed layout from a flatbuffer root message.
Sourcepub unsafe fn new_viewed_unchecked(
encoding: LayoutEncodingRef,
dtype: DType,
flatbuffer: ByteBuffer,
flatbuffer_loc: usize,
ctx: LayoutContextRef,
) -> Self
pub unsafe fn new_viewed_unchecked( encoding: LayoutEncodingRef, dtype: DType, flatbuffer: ByteBuffer, flatbuffer_loc: usize, ctx: LayoutContextRef, ) -> Self
Create a new viewed layout from a flatbuffer root message.
§SAFETY
Assumes that flatbuffer has been previously validated and has same encoding id as the passed encoding
Sourcepub fn encoding(&self) -> LayoutEncodingRef
pub fn encoding(&self) -> LayoutEncodingRef
Returns the crate::LayoutEncoding for this layout.
Sourcepub fn child(&self, i: usize, dtype: DType) -> VortexResult<LayoutData>
pub fn child(&self, i: usize, dtype: DType) -> VortexResult<LayoutData>
Sourcepub fn child_row_count(&self, i: usize) -> u64
pub fn child_row_count(&self, i: usize) -> u64
Sourcepub fn segment_id(&self, i: usize) -> Option<SegmentId>
pub fn segment_id(&self, i: usize) -> Option<SegmentId>
Fetch the i’th segment id of the layout.
Sourcepub fn segments(&self) -> impl Iterator<Item = SegmentId> + '_
pub fn segments(&self) -> impl Iterator<Item = SegmentId> + '_
Iterate the segment IDs of the layout.
Sourcepub fn reader(
&self,
segments: Arc<dyn AsyncSegmentReader>,
ctx: ContextRef,
) -> VortexResult<Arc<dyn LayoutReader + 'static>>
pub fn reader( &self, segments: Arc<dyn AsyncSegmentReader>, ctx: ContextRef, ) -> VortexResult<Arc<dyn LayoutReader + 'static>>
Create a reader for this layout.
Sourcepub fn register_splits(
&self,
field_mask: &[FieldMask],
row_offset: u64,
splits: &mut BTreeSet<u64>,
) -> VortexResult<()>
pub fn register_splits( &self, field_mask: &[FieldMask], row_offset: u64, splits: &mut BTreeSet<u64>, ) -> VortexResult<()>
Register splits for this layout.
Trait Implementations§
Source§impl Clone for LayoutData
impl Clone for LayoutData
Source§fn clone(&self) -> LayoutData
fn clone(&self) -> LayoutData
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutData
impl Debug for LayoutData
Source§impl WriteFlatBuffer for LayoutData
impl WriteFlatBuffer for LayoutData
type Target<'a> = Layout<'a>
fn write_flatbuffer<'fb>( &self, fbb: &mut FlatBufferBuilder<'fb>, ) -> WIPOffset<Self::Target<'fb>>
impl FlatBufferRoot for LayoutData
Auto Trait Implementations§
impl !Freeze for LayoutData
impl !RefUnwindSafe for LayoutData
impl Send for LayoutData
impl Sync for LayoutData
impl Unpin for LayoutData
impl !UnwindSafe for LayoutData
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreSource§impl<F> WriteFlatBufferExt for Fwhere
F: WriteFlatBuffer + FlatBufferRoot,
impl<F> WriteFlatBufferExt for Fwhere
F: WriteFlatBuffer + FlatBufferRoot,
Source§fn write_flatbuffer_bytes(&self) -> ConstBuffer<u8, 8>
fn write_flatbuffer_bytes(&self) -> ConstBuffer<u8, 8>
Write the flatbuffer into a
FlatBuffer.