pub enum EraFileType {
Era,
Era1,
Ere,
}Expand description
Era file type identifier
Variants§
Era
Consensus layer ERA file, .era
Contains beacon blocks and states
Era1
Execution layer ERA1 file, .era1
Contains execution blocks pre-merge
Ere
Execution layer ERE file, .ere
Contains execution blocks for both pre-merge and post-merge
Implementations§
Source§impl EraFileType
impl EraFileType
Sourcepub const fn extension(&self) -> &'static str
pub const fn extension(&self) -> &'static str
Get the canonical file extension for this type, dot included.
Used when writing files. For recognizing downloaded files, which may use an alternate
extension, see extensions.
Sourcepub const fn extensions(&self) -> &'static [&'static str]
pub const fn extensions(&self) -> &'static [&'static str]
All file extensions this type may be published with, dot included, ordered longest-first.
ere files are served as either .erae (current ethPandaOps naming) or .ere. The
longest-first order matters for substring scans so .ere never matches inside .erae.
Sourcepub const fn has_checksums(&self) -> bool
pub const fn has_checksums(&self) -> bool
Whether files of this type are published with a checksums.txt for verification.
Execution-layer files (era1, ere) ship checksums; consensus-layer era files do not.
Sourcepub fn from_filename(filename: &str) -> Option<Self>
pub fn from_filename(filename: &str) -> Option<Self>
Detect file type from a filename
Sourcepub fn format_filename(
&self,
network_name: &str,
era_number: u64,
hash: Option<[u8; 4]>,
include_era_count: bool,
era_count: u64,
) -> String
pub fn format_filename( &self, network_name: &str, era_number: u64, hash: Option<[u8; 4]>, include_era_count: bool, era_count: u64, ) -> String
Generate era file name.
Standard format: <config-name>-<era-number>-<short-historical-root>.<ext>
See also https://github.com/eth-clients/e2store-format-specs/blob/main/formats/era.md#file-name
With era count (for custom exports):
<config-name>-<era-number>-<era-count>-<short-historical-root>.<ext>
Trait Implementations§
Source§impl Clone for EraFileType
impl Clone for EraFileType
Source§fn clone(&self) -> EraFileType
fn clone(&self) -> EraFileType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EraFileType
Source§impl Debug for EraFileType
impl Debug for EraFileType
impl Eq for EraFileType
Source§impl Hash for EraFileType
impl Hash for EraFileType
Source§impl PartialEq for EraFileType
impl PartialEq for EraFileType
Source§fn eq(&self, other: &EraFileType) -> bool
fn eq(&self, other: &EraFileType) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EraFileType
Auto Trait Implementations§
impl Freeze for EraFileType
impl RefUnwindSafe for EraFileType
impl Send for EraFileType
impl Sync for EraFileType
impl Unpin for EraFileType
impl UnsafeUnpin for EraFileType
impl UnwindSafe for EraFileType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Era: 0 bytesEra1: 0 bytesEre: 0 bytes