#[repr(C)]pub struct TileState {
pub tile_id: u8,
pub status: u8,
pub tick: u32,
pub generation: u16,
pub _reserved: [u8; 2],
pub graph: CompactGraph,
pub evidence: EvidenceAccumulator,
pub delta_buffer: [Delta; 64],
pub delta_count: u16,
pub delta_head: u16,
pub last_report: TileReport,
}Expand description
Tile state containing all local state for a worker tile
Fields§
§tile_id: u8Tile identifier (0-255)
status: u8Status flags
tick: u32Current tick number
generation: u16Generation number (incremented on structural changes)
_reserved: [u8; 2]Reserved padding
graph: CompactGraphLocal graph shard
evidence: EvidenceAccumulatorEvidence accumulator
delta_buffer: [Delta; 64]Delta ingestion buffer
delta_count: u16Number of deltas in buffer
delta_head: u16Buffer head pointer
last_report: TileReportLast report produced
Implementations§
Source§impl TileState
impl TileState
Sourcepub const STATUS_INITIALIZED: u8 = 1u8
pub const STATUS_INITIALIZED: u8 = 1u8
Status: tile is initialized
Sourcepub const STATUS_HAS_DELTAS: u8 = 2u8
pub const STATUS_HAS_DELTAS: u8 = 2u8
Status: tile has pending deltas
Sourcepub const STATUS_DIRTY: u8 = 4u8
pub const STATUS_DIRTY: u8 = 4u8
Status: tile needs recomputation
Sourcepub const STATUS_ERROR: u8 = 128u8
pub const STATUS_ERROR: u8 = 128u8
Status: tile is in error state
Sourcepub fn ingest_delta(&mut self, delta: &Delta) -> bool
pub fn ingest_delta(&mut self, delta: &Delta) -> bool
Ingest a delta into the buffer
Returns true if the delta was successfully buffered. Returns false if the buffer is full.
Sourcepub unsafe fn ingest_delta_raw(&mut self, ptr: *const u8) -> bool
pub unsafe fn ingest_delta_raw(&mut self, ptr: *const u8) -> bool
Ingest a delta from raw bytes
§Safety
The caller must ensure that ptr points to a valid Delta structure
and that the pointer is properly aligned.
Sourcepub fn tick(&mut self, tick_number: u32) -> TileReport
pub fn tick(&mut self, tick_number: u32) -> TileReport
Process one tick of the kernel
This is the main entry point for the tick loop. It:
- Processes all buffered deltas
- Updates the evidence accumulator
- Recomputes graph connectivity if needed
- Produces a tile report
Sourcepub fn get_witness_fragment(&self) -> WitnessFragment
pub fn get_witness_fragment(&self) -> WitnessFragment
Get the current witness fragment
Sourcepub const fn memory_size() -> usize
pub const fn memory_size() -> usize
Get total memory size of tile state
Sourcepub fn has_pending_deltas(&self) -> bool
pub fn has_pending_deltas(&self) -> bool
Check if tile has pending deltas