pub struct FuelBlock { /* private fields */ }
Expand description
Fuel block with all transaction data included
Implementations§
Source§impl FuelBlock
impl FuelBlock
Sourcepub fn new(
header: PartialFuelBlockHeader,
transactions: Vec<Transaction>,
message_ids: &[MessageId],
) -> Self
pub fn new( header: PartialFuelBlockHeader, transactions: Vec<Transaction>, message_ids: &[MessageId], ) -> Self
Create a new full fuel block from a PartialFuelBlockHeader
,
executed transactions and the MessageId
s.
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.
Sourcepub fn to_db_block(&self) -> FuelBlockDb
pub fn to_db_block(&self) -> FuelBlockDb
Create a database friendly fuel block.
Sourcepub fn from_db_block(
db_block: FuelBlockDb,
transactions: Vec<Transaction>,
) -> Self
pub fn from_db_block( db_block: FuelBlockDb, transactions: Vec<Transaction>, ) -> Self
Convert from a previously stored block back to a full block
Sourcepub fn transactions(&self) -> &[Transaction]
pub fn transactions(&self) -> &[Transaction]
Get the executed transactions.
Sourcepub fn header(&self) -> &FuelBlockHeader
pub fn header(&self) -> &FuelBlockHeader
Get the complete header.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FuelBlock
impl RefUnwindSafe for FuelBlock
impl Send for FuelBlock
impl Sync for FuelBlock
impl Unpin for FuelBlock
impl UnwindSafe for FuelBlock
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