#[repr(u16)]pub enum FrameType {
HeaderMetadata = 1,
HeaderIndex = 2,
HeaderHash = 3,
FooterHash = 5,
FooterIndex = 6,
FooterMetadata = 7,
PrecederMetadata = 8,
NTensorFrame = 9,
}Expand description
Frame type identifiers (uint16).
The body phase may hold any number of data-object frames. In
v3 the registry defines exactly one concrete data-object type,
FrameType::NTensorFrame (type 9). Future data-object types
slot in at fresh unused numbers without a wire-format version
bump. Type 4 is reserved and cannot be emitted nor read —
it was occupied by the obsolete v2 NTensorFrame layout.
Variants§
HeaderMetadata = 1
HeaderIndex = 2
HeaderHash = 3
PrecederMetadata = 8
Per-object metadata frame that immediately precedes a data-object
frame. Carries a GlobalMetadata CBOR with a single-entry
base array containing metadata for the next data object.
_reserved_ and _extra_ are empty in the preceder.
NTensorFrame = 9
N-dimensional tensor data-object frame — the canonical data-object type in v3. Optionally carries compressed bitmask companions identifying positions of NaN / +Inf / −Inf values in the original input.
Layout: frame header, then the encoded payload (with
non-finite values substituted with 0.0 when masks are
present), then up to three compressed bitmask blobs, then the
CBOR descriptor (with an optional "masks" sub-map carrying
per-kind method / offset / length), then the 20-byte type-
specific footer [cbor_offset u64][hash u64][ENDF].
See plans/WIRE_FORMAT.md §6.5 for the full frame layout and
mask design.
Implementations§
Source§impl FrameType
impl FrameType
pub fn from_u16(v: u16) -> Result<Self>
Sourcepub fn is_data_object(self) -> bool
pub fn is_data_object(self) -> bool
True for frames that carry a data-object payload.
Structured as a match to leave room for future non-tensor
data-object variants (see the frame-type registry comment).
In v3 this matches only FrameType::NTensorFrame (type 9).
Trait Implementations§
impl Copy for FrameType
impl Eq for FrameType
impl StructuralPartialEq for FrameType
Auto Trait Implementations§
impl Freeze for FrameType
impl RefUnwindSafe for FrameType
impl Send for FrameType
impl Sync for FrameType
impl Unpin for FrameType
impl UnsafeUnpin for FrameType
impl UnwindSafe for FrameType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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