Struct fuel_core_interfaces::model::PartialFuelBlock
source · pub struct PartialFuelBlock {
pub header: PartialFuelBlockHeader,
pub transactions: Vec<Transaction>,
}Expand description
Fuel block with all transaction data included
but without any data generated.
This type can be created with unexecuted
transactions to produce a FuelBlock or
it can be created with pre-executed transactions in
order to validate they were constructed correctly.
Fields
header: PartialFuelBlockHeaderThe partial header.
transactions: Vec<Transaction>Transactions that can either be pre-executed or not.
Implementations
sourceimpl PartialFuelBlock
impl PartialFuelBlock
pub fn new(
header: PartialFuelBlockHeader,
transactions: Vec<Transaction>
) -> Self
sourcepub fn to_partial_db_block(&self) -> FuelBlockDb
pub fn to_partial_db_block(&self) -> FuelBlockDb
Creates a FuelBlockDb that has the
generated fields set to meaningless values.
Hack until we figure out a better way to represent a block in the database that hasn’t been run.
sourcepub fn generate(self, message_ids: &[MessageId]) -> FuelBlock
pub fn generate(self, message_ids: &[MessageId]) -> FuelBlock
Generate a FuelBlock after running this partial block.
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.
Trait Implementations
sourceimpl Clone for PartialFuelBlock
impl Clone for PartialFuelBlock
sourcefn clone(&self) -> PartialFuelBlock
fn clone(&self) -> PartialFuelBlock
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 PartialFuelBlock
impl Debug for PartialFuelBlock
Auto Trait Implementations
impl RefUnwindSafe for PartialFuelBlock
impl Send for PartialFuelBlock
impl Sync for PartialFuelBlock
impl Unpin for PartialFuelBlock
impl UnwindSafe for PartialFuelBlock
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