pub struct EraGroup {
pub blocks: Vec<CompressedSignedBeaconBlock>,
pub era_state: CompressedBeaconState,
pub other_entries: Vec<Entry>,
pub slot_index: Option<SlotIndex>,
pub state_slot_index: SlotIndex,
}
Expand description
Era file content group
Format: Version | block* | era-state | other-entries* | slot-index(block)? | slot-index(state)
See also https://github.com/eth-clients/e2store-format-specs/blob/main/formats/era.md#structure
Fields§
§blocks: Vec<CompressedSignedBeaconBlock>
Group including all blocks leading up to the era transition in slot order
era_state: CompressedBeaconState
State in the era transition slot
other_entries: Vec<Entry>
Other entries that don’t fit into standard categories
slot_index: Option<SlotIndex>
Block slot index, omitted for genesis era
state_slot_index: SlotIndex
State slot index
Implementations§
Source§impl EraGroup
impl EraGroup
Sourcepub const fn new(
blocks: Vec<CompressedSignedBeaconBlock>,
era_state: CompressedBeaconState,
state_slot_index: SlotIndex,
) -> Self
pub const fn new( blocks: Vec<CompressedSignedBeaconBlock>, era_state: CompressedBeaconState, state_slot_index: SlotIndex, ) -> Self
Create a new era group
Sourcepub const fn with_block_index(
blocks: Vec<CompressedSignedBeaconBlock>,
era_state: CompressedBeaconState,
slot_index: SlotIndex,
state_slot_index: SlotIndex,
) -> Self
pub const fn with_block_index( blocks: Vec<CompressedSignedBeaconBlock>, era_state: CompressedBeaconState, slot_index: SlotIndex, state_slot_index: SlotIndex, ) -> Self
Create a new era group with block slot index
Sourcepub const fn is_genesis(&self) -> bool
pub const fn is_genesis(&self) -> bool
Check if this is a genesis era - no blocks yet
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EraGroup
impl RefUnwindSafe for EraGroup
impl Send for EraGroup
impl Sync for EraGroup
impl Unpin for EraGroup
impl UnwindSafe for EraGroup
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
§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: 136 bytes