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§
Source§impl 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.
Source§impl 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§
Source§impl AsRef<FuelConsensusHeader<Empty>> for PartialFuelBlockHeader
impl AsRef<FuelConsensusHeader<Empty>> for PartialFuelBlockHeader
Source§fn as_ref(&self) -> &FuelConsensusHeader<Empty>
fn as_ref(&self) -> &FuelConsensusHeader<Empty>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for PartialFuelBlockHeader
impl Clone for PartialFuelBlockHeader
Source§fn clone(&self) -> PartialFuelBlockHeader
fn clone(&self) -> PartialFuelBlockHeader
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PartialFuelBlockHeader
impl Debug for PartialFuelBlockHeader
Auto Trait Implementations§
impl Freeze for PartialFuelBlockHeader
impl RefUnwindSafe for PartialFuelBlockHeader
impl Send for PartialFuelBlockHeader
impl Sync for PartialFuelBlockHeader
impl Unpin for PartialFuelBlockHeader
impl UnwindSafe for PartialFuelBlockHeader
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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