ptwm_core::container
ptwm_core::container
Container writer and reader orchestration.
ptwm_core::container
crates/ptwm-core/src/container.rs:1mod containerContainer writer and reader orchestration.
ptwm_core::container::build_extension_table
crates/ptwm-core/src/container.rs:167pub fn build_extension_table(registry: &ChainRegistry, codecs: CodecSet<'_>, builtin_version: &str) -> Result<BuiltExtensionTable, PtwmCoreError>Build the Extension Table and the serialized chain registry for a container. Chain ops are interned first (in registry order), then the plane codecs selected by `codecs`, in the order of [`crate::extension::builtin_entries`].
ptwm_core::container::BuiltExtensionTable
crates/ptwm-core/src/container.rs:146pub struct BuiltExtensionTableOutput of [`build_extension_table`].
ptwm_core::container::ChainRegistry
crates/ptwm-core/src/container.rs:51pub struct ChainRegistryIn-memory chain registry section.
ptwm_core::container::CodecSet
crates/ptwm-core/src/container.rs:137pub enum CodecSetWhich plane codecs an Extension Table interns besides the chain ops.
ptwm_core::container::ContainerLayout
crates/ptwm-core/src/container.rs:335pub enum ContainerLayoutOn-disk layout of a container.
ptwm_core::container::ContainerReader
crates/ptwm-core/src/container.rs:1334pub struct ContainerReaderZero-copy reader for a `.ptwm` container backed by an in-memory byte slice.
ptwm_core::container::ContainerWriter
crates/ptwm-core/src/container.rs:424pub struct ContainerWriterStreaming writer for a `.ptwm` container.
ptwm_core::container::encode_registry_for_table
crates/ptwm-core/src/container.rs:238pub fn encode_registry_for_table(table_bytes: &[u8], registry: &ChainRegistry) -> Result<BuiltExtensionTable, PtwmCoreError>Validate serialized Extension Table bytes and encode `registry` against them, for [`ContainerWriter::set_raw_extension_table`].
ptwm_core::container::MAX_CHAIN_ID
crates/ptwm-core/src/container.rs:34pub const MAX_CHAIN_IDLargest registry chain id. A tensor record addresses a registry chain through the low 15 bits of `chain_ref`; the high bit marks an inline chain.
ptwm_core::container::MAX_REGISTRY_CHAINS
crates/ptwm-core/src/container.rs:38pub const MAX_REGISTRY_CHAINSLargest number of chains a registry can hold: one per id in `0..=MAX_CHAIN_ID`.
ptwm_core::container::read_extension_table
crates/ptwm-core/src/container.rs:1315pub fn read_extension_table(buf: &[u8]) -> Result<ExtensionTable, PtwmCoreError>Read the Extension Table of a container in either layout without opening the rest of it: no extension check, prelude, registry or index parse.
ptwm_core::container::RecordEncoder
crates/ptwm-core/src/container.rs:383pub struct RecordEncoderSerializes tensor records for one container writer's layout and tables.