Skip to main content

SectionKind

Enum SectionKind 

Source
#[repr(u8)]
pub enum SectionKind {
Show 18 variants NameTable = 1, Variables = 2, ListDefs = 3, ListItems = 4, Externals = 5, Containers = 6, LineTables = 7, Labels = 8, ListLiterals = 9, AddressPaths = 10, LiteralPool = 11, StructShapes = 12, EffectRows = 13, Visibility = 14, AliasTable = 15, FrameShapes = 16, DebugInfo = 17, LineVariantGroups = 18,
}
Expand description

Identifies a section within an .inkb file.

Variants§

§

NameTable = 1

§

Variables = 2

§

ListDefs = 3

§

ListItems = 4

§

Externals = 5

§

Containers = 6

§

LineTables = 7

§

Labels = 8

§

ListLiterals = 9

§

AddressPaths = 10

§

LiteralPool = 11

T1b LiteralPool (docs/format-v4-rfc.md §2): content-hash deduplicated constant values referenced by PushLiteral(idx). Additive alongside ListLiterals — see the T1b-2 PR description for why the RFC’s ListLiterals absorption is deferred, not done here.

§

StructShapes = 12

TM-4 StructShapes (docs/typed-mode-spec.md §6): one entry per declared STRUCT — shape id, name, ordered field names. Reserved (count always 0) through 4.0; this PR lands the section’s real encoding at the format layer only — nothing in the compiler emits a non-empty table yet (see the PR description’s scope note).

§

EffectRows = 13

T2-3 EffectRows (docs/effects-spec.md §11, docs/format-v4-rfc.md §2): the DefinitionId → row table of factored effect rows — one per knot/stitch (the resume-scheduling estimate, §12.1). Section-locally versioned (one prefix byte) so the row encoding can grow without a format-wide bump — the reservation this graduates was made for exactly this, so no VERSION bump accompanies it. Always present (possibly empty). Was reserved (count-0) through v5; this slice lands the real encoding and first emission (rows are inert metadata the runtime does not yet read).

§

Visibility = 14

M-2b Visibility (docs/modules-spec.md §4, docs/format-spec.md): the DefinitionIds of every #@private definition, sorted ascending. Omitted entirely when empty (the common all-public case), so public-only stories stay byte-identical for that section — the section is purely additive and self-framed in the offset table. 0x0D is claimed by EffectRows, so this takes the next free tag.

§

AliasTable = 15

M-3 AliasTable (docs/modules-spec.md §5): old→new DefinitionId rename records from #@was(old_name) directives. Section-locally versioned (one prefix byte) so the row encoding can grow without a format-wide bump. Always present (possibly empty) from v5 onward. 0x0E was claimed by Visibility (M-2b), so this takes the next free tag.

§

FrameShapes = 16

FS-3 FrameShapes (docs/flow-suspension-spec.md §4/§11): one name-keyed frame shape per await site — the static crossing-locals description the runtime spills/restores around a park. Section-locally versioned (one prefix byte) so the shape encoding can grow without a format-wide bump. Omitted entirely when empty (the common case — and, behind the E052 fence, the only case today, since no await compiles yet), so all existing stories stay byte-identical and no VERSION bump is needed. 0x0F was claimed by AliasTable, so this takes the next free tag.

§

DebugInfo = 17

D6 DebugInfo (docs/debugger-spec.md §2, issue #3184): the bytecode-offset → source-range map, plus its section-local file table. Section-locally versioned (one prefix byte) so the entry encoding can grow (e.g. the reserved NodeId column, §1.3) without a format-wide bump. Omitted entirely when not requested — the ship-policy default (§1.2): a release-exported story never carries this section, so every existing story stays byte-identical and no VERSION bump is needed. 0x10 was claimed by FrameShapes, so this takes the next free tag — the test this graduates, from_u8_rejects_unclaimed_section_tag, is updated alongside this variant (not deleted) to pin the new next-free tag (0x12).

§

LineVariantGroups = 18

Stage 1 of the shared-alternatives track (issue #3273, docs/decision-log.md 2026-08-29): crate::LineVariantGroup records tying runs of consecutive line-table entries back to one authored line whose inline alternatives were enumerated at recognition time. Section-locally versioned (one prefix byte) so the record encoding can grow without a format-wide bump. Omitted entirely when empty — nothing emits a non-empty table until the stage-2 flip (#3274), so every existing story stays byte-identical and no VERSION bump is needed. 0x11 is claimed by DebugInfo, so this takes the next free tag.

Trait Implementations§

Source§

impl Clone for SectionKind

Source§

fn clone(&self) -> SectionKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SectionKind

Source§

impl Debug for SectionKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SectionKind

Source§

impl Hash for SectionKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for SectionKind

Source§

fn eq(&self, other: &SectionKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SectionKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.