Struct fuel_core_interfaces::executor::UncommittedResult
source · pub struct UncommittedResult<DbTransaction> { /* private fields */ }
Expand description
The uncommitted result of transactions execution with database transaction. The caller should commit the result by itself.
Implementations§
source§impl<DbTransaction> UncommittedResult<DbTransaction>
impl<DbTransaction> UncommittedResult<DbTransaction>
sourcepub fn new(result: ExecutionResult, database_transaction: DbTransaction) -> Self
pub fn new(result: ExecutionResult, database_transaction: DbTransaction) -> Self
Create a new instance of UncommittedResult
.
sourcepub fn result(&self) -> &ExecutionResult
pub fn result(&self) -> &ExecutionResult
Returns a reference to the ExecutionResult
.
sourcepub fn into(self) -> (ExecutionResult, DbTransaction)
pub fn into(self) -> (ExecutionResult, DbTransaction)
Return the result and database transaction.
The service can unpack the UncommittedResult
, apply some changes and pack it again into
UncommittedResult
. Because commit
of the database transaction consumes self
,
after committing it is not possible create UncommittedResult
.
sourcepub fn into_result(self) -> ExecutionResult
pub fn into_result(self) -> ExecutionResult
Discards the database transaction and returns only the result of execution.
sourcepub fn into_transaction(self) -> DbTransaction
pub fn into_transaction(self) -> DbTransaction
Discards the result and return database transaction.