pub trait EraBlockWriter {
// Required method
fn write_file<H, B, R>(
network: &str,
max_blocks_per_file: u64,
blocks: &[ExportBlock<H, B, R>],
dir: &Path,
) -> Result<PathBuf>
where H: BlockHeader + Encodable,
B: Encodable,
R: Receipt;
}Expand description
Writes a chunk of consecutive blocks as a single ERA file.
One implementor exists per ERA format. A chunk is ordered, non-empty, and at most
ExportConfig::max_blocks_per_file blocks long.
Required Methods§
Sourcefn write_file<H, B, R>(
network: &str,
max_blocks_per_file: u64,
blocks: &[ExportBlock<H, B, R>],
dir: &Path,
) -> Result<PathBuf>where
H: BlockHeader + Encodable,
B: Encodable,
R: Receipt,
fn write_file<H, B, R>(
network: &str,
max_blocks_per_file: u64,
blocks: &[ExportBlock<H, B, R>],
dir: &Path,
) -> Result<PathBuf>where
H: BlockHeader + Encodable,
B: Encodable,
R: Receipt,
Writes blocks as a single ERA file in dir, returning the created file’s path.
max_blocks_per_file is the configured per-file ceiling; a writer compares it against its
own format limit to decide whether the filename carries an era-count segment.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".