JobOutputStore

Trait JobOutputStore 

Source
pub trait JobOutputStore {
    // Required methods
    fn put(&mut self, id: ChunkId, data: Vec<u8>) -> Result<(), FabricError>;
    fn get(&self, id: ChunkId) -> Result<Option<Vec<u8>>, FabricError>;
    fn contains(&self, id: ChunkId) -> bool;
    fn clear(&mut self);
}
Expand description

Trait for storing and retrieving chunk outputs by ID.

Implementations can back this with memory, block storage, or any other durable medium. The coordinator uses the store for idempotent output capture — if a chunk’s output already exists, it is skipped on retry.

Required Methods§

Source

fn put(&mut self, id: ChunkId, data: Vec<u8>) -> Result<(), FabricError>

Store output bytes for a chunk.

§Errors

Returns a FabricError if the store cannot persist the output.

Source

fn get(&self, id: ChunkId) -> Result<Option<Vec<u8>>, FabricError>

Retrieve output bytes for a chunk, if present.

§Errors

Returns a FabricError on read failure (not on missing key — that returns Ok(None)).

Source

fn contains(&self, id: ChunkId) -> bool

Check whether output exists for a chunk.

Source

fn clear(&mut self)

Remove all stored outputs (teardown).

Implementors§