pub trait Segment<Provider: StaticFileProviderFactory>: Send + Sync {
// Required methods
fn segment(&self) -> StaticFileSegment;
fn copy_to_static_files(
&self,
provider: Provider,
block_range: RangeInclusive<BlockNumber>,
) -> ProviderResult<()>;
}Expand description
A segment represents moving some portion of the data to static files.
Required Methods§
Sourcefn segment(&self) -> StaticFileSegment
fn segment(&self) -> StaticFileSegment
Returns the StaticFileSegment.
Sourcefn copy_to_static_files(
&self,
provider: Provider,
block_range: RangeInclusive<BlockNumber>,
) -> ProviderResult<()>
fn copy_to_static_files( &self, provider: Provider, block_range: RangeInclusive<BlockNumber>, ) -> ProviderResult<()>
Move data to static files for the provided block range.
StaticFileProvider will handle
the management of and writing to files.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".