ptwm_core::tensor_record
ptwm_core::tensor_record
Tensor record serialization.
ptwm_core::tensor_record
crates/ptwm-core/src/tensor_record.rs:1mod tensor_recordTensor record serialization.
ptwm_core::tensor_record::CHAIN_REF_INLINE_BIT
crates/ptwm-core/src/tensor_record.rs:19pub const CHAIN_REF_INLINE_BITHigh bit of `chain_ref`: when set, an inline chain follows the fixed header.
ptwm_core::tensor_record::Dependency
crates/ptwm-core/src/tensor_record.rs:41pub struct Dependencyptwm_core::tensor_record::parse_tensor_record
crates/ptwm-core/src/tensor_record.rs:265pub fn parse_tensor_record(buf: &[u8]) -> Result<(TensorRecord, usize), PtwmCoreError>ptwm_core::tensor_record::parse_tensor_record_with_builtin_version
crates/ptwm-core/src/tensor_record.rs:276pub fn parse_tensor_record_with_builtin_version(buf: &[u8]) -> Result<(TensorRecord, usize, Option<String>), PtwmCoreError>[`parse_tensor_record`] that also returns the built-in version of the inline chain's Extension Table (see [`crate::extension::normalize_builtin_ids`]), or `None` when the record has no inline chain or its table holds no built-in entry.
ptwm_core::tensor_record::peek_tensor_record_name
crates/ptwm-core/src/tensor_record.rs:249pub fn peek_tensor_record_name(buf: &[u8]) -> Result<&str, PtwmCoreError>Read only the tensor name from serialized record bytes, without parsing or copying the rest of the record.
ptwm_core::tensor_record::RefKind
crates/ptwm-core/src/tensor_record.rs:23pub enum RefKindptwm_core::tensor_record::TENSOR_FLAG_DEPENDENCIES
crates/ptwm-core/src/tensor_record.rs:15pub const TENSOR_FLAG_DEPENDENCIESptwm_core::tensor_record::TENSOR_FLAG_METADATA
crates/ptwm-core/src/tensor_record.rs:16pub const TENSOR_FLAG_METADATAptwm_core::tensor_record::TENSOR_FLAG_PAYLOAD_HASH
crates/ptwm-core/src/tensor_record.rs:17pub const TENSOR_FLAG_PAYLOAD_HASHptwm_core::tensor_record::TensorRecord
crates/ptwm-core/src/tensor_record.rs:58pub struct TensorRecordA serialized tensor record.
ptwm_core::tensor_record::write_tensor_record
crates/ptwm-core/src/tensor_record.rs:99pub fn write_tensor_record(rec: &TensorRecord, out: &mut Vec<u8>) -> Result<(), PtwmCoreError>Append the serialized record to `out`. Built-in entries of an inline chain's Extension Table carry the ids and labels of [`LEGACY_BUILTIN_VERSION`].
ptwm_core::tensor_record::write_tensor_record_with_builtin_version
crates/ptwm-core/src/tensor_record.rs:106pub fn write_tensor_record_with_builtin_version(rec: &TensorRecord, out: &mut Vec<u8>, builtin_version: &str) -> Result<(), PtwmCoreError>[`write_tensor_record`] with the inline chain's Extension Table written with the built-in ids and labels of `builtin_version`. The transcoder uses it to reproduce records written by other releases.