Struct fuel_core::database::transactional::DatabaseTransaction
source · [−]pub struct DatabaseTransaction { /* private fields */ }Implementations
Methods from Deref<Target = Database>
pub fn get_block_height(&self) -> Result<Option<BlockHeight>, Error>
pub fn get_block_id(
&self,
height: BlockHeight
) -> Result<Option<Bytes32>, Error>
pub fn all_block_ids(
&self,
start: Option<BlockHeight>,
direction: Option<IterDirection>
) -> impl Iterator<Item = Result<(BlockHeight, Bytes32), Error>> + '_
pub fn owned_coins(
&self,
owner: Address,
start_coin: Option<UtxoId>,
direction: Option<IterDirection>
) -> impl Iterator<Item = Result<UtxoId, Error>> + '_
pub fn owned_coins_by_asset_id(
&self,
owner: Address,
asset_id: AssetId,
start_coin: Option<UtxoId>,
direction: Option<IterDirection>
) -> impl Iterator<Item = Result<UtxoId, Error>> + '_
pub fn init_chain_name(&self, name: String) -> Result<(), Error>
pub fn get_chain_name(&self) -> Result<Option<String>, Error>
pub fn init_chain_height(&self, height: BlockHeight) -> Result<(), Error>
pub fn get_starting_chain_height(&self) -> Result<Option<BlockHeight>, Error>
pub fn all_transactions(
&self,
start: Option<&Bytes32>,
direction: Option<IterDirection>
) -> impl Iterator<Item = Result<Transaction, Error>> + '_
sourcepub fn owned_transactions(
&self,
owner: &Address,
start: Option<&OwnedTransactionIndexCursor>,
direction: Option<IterDirection>
) -> impl Iterator<Item = Result<(OwnedTransactionIndexCursor, Bytes32), Error>> + '_
pub fn owned_transactions(
&self,
owner: &Address,
start: Option<&OwnedTransactionIndexCursor>,
direction: Option<IterDirection>
) -> impl Iterator<Item = Result<(OwnedTransactionIndexCursor, Bytes32), Error>> + '_
Iterates over a KV mapping of [address + block height + tx idx] => transaction id. This
allows for efficient lookup of transaction ids associated with an address, sorted by
block age and ordering within a block. The cursor tracks the [block height + tx idx] for
pagination purposes.
pub fn record_tx_id_owner(
&self,
owner: &Address,
block_height: BlockHeight,
tx_idx: TransactionIndex,
tx_id: &Bytes32
) -> Result<Option<Bytes32>, Error>
pub fn update_tx_status(
&self,
tx_id: &Bytes32,
status: TransactionStatus
) -> Result<Option<TransactionStatus>, Error>
pub fn get_tx_status(
&self,
tx_id: &Bytes32
) -> Result<Option<TransactionStatus>, Error>
pub fn transaction(&self) -> DatabaseTransaction
Trait Implementations
sourceimpl AsMut<Database> for DatabaseTransaction
impl AsMut<Database> for DatabaseTransaction
sourceimpl AsRef<Database> for DatabaseTransaction
impl AsRef<Database> for DatabaseTransaction
sourceimpl Clone for DatabaseTransaction
impl Clone for DatabaseTransaction
sourcefn clone(&self) -> DatabaseTransaction
fn clone(&self) -> DatabaseTransaction
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 more
sourceimpl Debug for DatabaseTransaction
impl Debug for DatabaseTransaction
sourceimpl Default for DatabaseTransaction
impl Default for DatabaseTransaction
sourceimpl Deref for DatabaseTransaction
impl Deref for DatabaseTransaction
sourceimpl DerefMut for DatabaseTransaction
impl DerefMut for DatabaseTransaction
Auto Trait Implementations
impl !RefUnwindSafe for DatabaseTransaction
impl Send for DatabaseTransaction
impl Sync for DatabaseTransaction
impl Unpin for DatabaseTransaction
impl !UnwindSafe for DatabaseTransaction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more