pub trait LayoutEncoding:
'static
+ Send
+ Sync
+ Debug
+ Sealed {
// Required methods
fn as_any(&self) -> &dyn Any;
fn id(&self) -> LayoutEncodingId;
fn build(
&self,
dtype: &DType,
row_count: u64,
metadata: &[u8],
segment_ids: Vec<SegmentId>,
children: &dyn LayoutChildren,
build_ctx: &LayoutBuildContext<'_>,
) -> VortexResult<LayoutRef>;
}Expand description
Object-safe layout encoding registered in a LayoutSession.
Encoding instances deserialize serialized layout metadata into concrete LayoutRef nodes.
New in-tree encodings usually implement VTable and use LayoutEncodingAdapter, while
foreign encodings can provide an object-safe implementation directly.
Required Methods§
Sourcefn id(&self) -> LayoutEncodingId
fn id(&self) -> LayoutEncodingId
Returns the globally unique encoding id.
Sourcefn build(
&self,
dtype: &DType,
row_count: u64,
metadata: &[u8],
segment_ids: Vec<SegmentId>,
children: &dyn LayoutChildren,
build_ctx: &LayoutBuildContext<'_>,
) -> VortexResult<LayoutRef>
fn build( &self, dtype: &DType, row_count: u64, metadata: &[u8], segment_ids: Vec<SegmentId>, children: &dyn LayoutChildren, build_ctx: &LayoutBuildContext<'_>, ) -> VortexResult<LayoutRef>
Build a layout from serialized metadata, segment ids, and children.
Implementations must use build_ctx for session-scoped plugin resolution instead of global
registries.
Implementations§
Trait Implementations§
Source§impl AsRef<dyn LayoutEncoding> for ChunkedLayoutEncoding
impl AsRef<dyn LayoutEncoding> for ChunkedLayoutEncoding
Source§fn as_ref(&self) -> &dyn LayoutEncoding
fn as_ref(&self) -> &dyn LayoutEncoding
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<dyn LayoutEncoding> for DictLayoutEncoding
impl AsRef<dyn LayoutEncoding> for DictLayoutEncoding
Source§fn as_ref(&self) -> &dyn LayoutEncoding
fn as_ref(&self) -> &dyn LayoutEncoding
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<dyn LayoutEncoding> for FlatLayoutEncoding
impl AsRef<dyn LayoutEncoding> for FlatLayoutEncoding
Source§fn as_ref(&self) -> &dyn LayoutEncoding
fn as_ref(&self) -> &dyn LayoutEncoding
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<dyn LayoutEncoding> for StructLayoutEncoding
impl AsRef<dyn LayoutEncoding> for StructLayoutEncoding
Source§fn as_ref(&self) -> &dyn LayoutEncoding
fn as_ref(&self) -> &dyn LayoutEncoding
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<dyn LayoutEncoding> for ZonedLayoutEncoding
impl AsRef<dyn LayoutEncoding> for ZonedLayoutEncoding
Source§fn as_ref(&self) -> &dyn LayoutEncoding
fn as_ref(&self) -> &dyn LayoutEncoding
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<dyn LayoutEncoding> for LegacyStatsLayoutEncoding
impl AsRef<dyn LayoutEncoding> for LegacyStatsLayoutEncoding
Source§fn as_ref(&self) -> &dyn LayoutEncoding
fn as_ref(&self) -> &dyn LayoutEncoding
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Display for dyn LayoutEncoding + '_
impl Display for dyn LayoutEncoding + '_
impl Eq for dyn LayoutEncoding + '_
Source§impl PartialEq for dyn LayoutEncoding + '_
impl PartialEq for dyn LayoutEncoding + '_
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".