Skip to main content

TileReader

Trait TileReader 

Source
pub trait TileReader {
    type Error;

    // Required methods
    fn read_tile(&self, tile: &Tile) -> Result<Vec<u8>, Self::Error>;
    fn read_entry_bundle(&self, tile: &Tile) -> Result<Vec<u8>, Self::Error>;
}
Expand description

The object-storage / CDN read-path trait — an interface only.

A tiled transparency log serves its tree as immutable, content-addressed objects fetched by coordinate (see crate::tile); a verifier or monitor recomputes roots and proofs from those bytes. This trait abstracts that fetch so the verification core composes with any backend (S3, GCS, a CDN edge, a local mirror, a test fixture). This crate ships no implementation and performs no I/O — backends live in the operator layer. The associated TileReader::Error lets implementations surface their own error type without this crate depending on any I/O or async machinery.

Required Associated Types§

Source

type Error

The backend’s fetch-error type.

Required Methods§

Source

fn read_tile(&self, tile: &Tile) -> Result<Vec<u8>, Self::Error>

Fetch the raw bytes of the Merkle tile at tile’s coordinate (tile.path()), i.e. tile.width() consecutive 32-byte hashes.

§Errors

Returns the backend’s error if the object cannot be fetched.

Source

fn read_entry_bundle(&self, tile: &Tile) -> Result<Vec<u8>, Self::Error>

Fetch the raw bytes of the level-0 entry bundle at tile’s coordinate (tile.entries_path()).

§Errors

Returns the backend’s error if the object cannot be fetched.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§