pub struct PartialFuelBlockHeader {
pub application: FuelApplicationHeader<Empty>,
pub consensus: FuelConsensusHeader<Empty>,
pub metadata: Option<HeaderMetadata>,
}Expand description
A partially complete fuel block header that doesn’t not have any generated fields because it has not been executed yet.
Fields
application: FuelApplicationHeader<Empty>The application header.
consensus: FuelConsensusHeader<Empty>The consensus header.
metadata: Option<HeaderMetadata>Header Metadata
Implementations
sourceimpl PartialFuelBlockHeader
impl PartialFuelBlockHeader
sourcepub fn height(&self) -> &BlockHeight
pub fn height(&self) -> &BlockHeight
Fuel block height.
sourcepub fn consensus_type(&self) -> ConsensusType
pub fn consensus_type(&self) -> ConsensusType
The type of consensus this header is using.
sourceimpl PartialFuelBlockHeader
impl PartialFuelBlockHeader
sourcepub fn generate(
self,
transactions: &[Vec<u8>],
message_ids: &[MessageId]
) -> FuelBlockHeader
pub fn generate(
self,
transactions: &[Vec<u8>],
message_ids: &[MessageId]
) -> FuelBlockHeader
Generate all fields to create a full FuelBlockHeader
after running the transactions.
The order of the transactions must be the same order they were executed in. The order of the messages must be the same as they were produced in.
Message ids are produced by executed the transactions and collecting the ids from the receipts of messages outputs.
The transactions are the bytes of the executed [Transaction]s.
Trait Implementations
sourceimpl AsRef<FuelConsensusHeader<Empty>> for PartialFuelBlockHeader
impl AsRef<FuelConsensusHeader<Empty>> for PartialFuelBlockHeader
sourcefn as_ref(&self) -> &FuelConsensusHeader<Empty>
fn as_ref(&self) -> &FuelConsensusHeader<Empty>
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Clone for PartialFuelBlockHeader
impl Clone for PartialFuelBlockHeader
sourcefn clone(&self) -> PartialFuelBlockHeader
fn clone(&self) -> PartialFuelBlockHeader
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for PartialFuelBlockHeader
impl Debug for PartialFuelBlockHeader
sourceimpl Deref for PartialFuelBlockHeader
impl Deref for PartialFuelBlockHeader
type Target = FuelApplicationHeader<Empty>
type Target = FuelApplicationHeader<Empty>
The resulting type after dereferencing.
Auto Trait Implementations
impl RefUnwindSafe for PartialFuelBlockHeader
impl Send for PartialFuelBlockHeader
impl Sync for PartialFuelBlockHeader
impl Unpin for PartialFuelBlockHeader
impl UnwindSafe for PartialFuelBlockHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more