Struct solana_runtime::bank::Bank
source · [−]pub struct Bank {Show 14 fields
pub rc: BankRc,
pub src: StatusCacheRc,
pub ancestors: Ancestors,
pub ns_per_slot: u128,
pub rewards: RwLock<Vec<(Pubkey, RewardInfo)>>,
pub cluster_type: Option<ClusterType>,
pub lazy_rent_collection: AtomicBool,
pub rewards_pool_pubkeys: Arc<HashSet<Pubkey>>,
pub transaction_log_collector_config: Arc<RwLock<TransactionLogCollectorConfig>>,
pub transaction_log_collector: Arc<RwLock<TransactionLogCollector>>,
pub feature_set: Arc<FeatureSet>,
pub drop_callback: RwLock<OptionalDropCallback>,
pub freeze_started: AtomicBool,
pub cost_tracker: RwLock<CostTracker>,
/* private fields */
}
Expand description
Manager for the state of all accounts and programs after processing its entries. AbiExample is needed even without Serialize/Deserialize; actual (de-)serialization are implemented elsewhere for versioning
Fields
rc: BankRc
References to accounts, parent and signature status
src: StatusCacheRc
ancestors: Ancestors
The set of parents including this bank
ns_per_slot: u128
length of a slot in ns
rewards: RwLock<Vec<(Pubkey, RewardInfo)>>
Protocol-level rewards that were distributed by this bank
cluster_type: Option<ClusterType>
lazy_rent_collection: AtomicBool
rewards_pool_pubkeys: Arc<HashSet<Pubkey>>
transaction_log_collector_config: Arc<RwLock<TransactionLogCollectorConfig>>
transaction_log_collector: Arc<RwLock<TransactionLogCollector>>
feature_set: Arc<FeatureSet>
drop_callback: RwLock<OptionalDropCallback>
freeze_started: AtomicBool
cost_tracker: RwLock<CostTracker>
Implementations
sourceimpl Bank
impl Bank
pub fn new(genesis_config: &GenesisConfig) -> Self
pub fn new_no_wallclock_throttle(genesis_config: &GenesisConfig) -> Self
pub fn new_with_paths(
genesis_config: &GenesisConfig,
paths: Vec<PathBuf>,
frozen_account_pubkeys: &[Pubkey],
debug_keys: Option<Arc<HashSet<Pubkey>>>,
additional_builtins: Option<&Builtins>,
account_indexes: AccountSecondaryIndexes,
accounts_db_caching_enabled: bool,
shrink_ratio: AccountShrinkThreshold,
debug_do_not_add_builtins: bool,
accounts_update_notifier: Option<AccountsUpdateNotifier>
) -> Self
sourcepub fn new_from_parent(
parent: &Arc<Bank>,
collector_id: &Pubkey,
slot: Slot
) -> Self
pub fn new_from_parent(
parent: &Arc<Bank>,
collector_id: &Pubkey,
slot: Slot
) -> Self
Create a new bank that points to an immutable checkpoint of another bank.
pub fn new_from_parent_with_options(
parent: &Arc<Bank>,
collector_id: &Pubkey,
slot: Slot,
new_bank_options: NewBankOptions
) -> Self
pub fn new_from_parent_with_tracer(
parent: &Arc<Bank>,
collector_id: &Pubkey,
slot: Slot,
reward_calc_tracer: impl Fn(&RewardCalculationEvent<'_, '_>) + Send + Sync
) -> Self
pub fn set_callback(
&self,
callback: Option<Box<dyn DropCallback + Send + Sync>>
)
pub fn vote_only_bank(&self) -> bool
sourcepub fn warp_from_parent(
parent: &Arc<Bank>,
collector_id: &Pubkey,
slot: Slot
) -> Self
pub fn warp_from_parent(
parent: &Arc<Bank>,
collector_id: &Pubkey,
slot: Slot
) -> Self
Like new_from_parent
but additionally:
- Doesn’t assume that the parent is anywhere near
slot
, parent could be millions of slots in the past - Adjusts the new bank’s tick height to avoid having to run PoH for millions of slots
- Freezes the new bank, assuming that the user will
Bank::new_from_parent
from this bank
pub fn collector_id(&self) -> &Pubkey
pub fn genesis_creation_time(&self) -> UnixTimestamp
pub fn slot(&self) -> Slot
pub fn bank_id(&self) -> BankId
pub fn epoch(&self) -> Epoch
pub fn first_normal_epoch(&self) -> Epoch
pub fn freeze_lock(&self) -> RwLockReadGuard<'_, Hash>
pub fn hash(&self) -> Hash
pub fn is_frozen(&self) -> bool
pub fn freeze_started(&self) -> bool
pub fn status_cache_ancestors(&self) -> Vec<u64>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourcepub fn unix_timestamp_from_genesis(&self) -> i64
pub fn unix_timestamp_from_genesis(&self) -> i64
computed unix_timestamp at this slot height
sourcepub fn get_unused_from_slot(rooted_slot: Slot, unused: u64) -> u64
pub fn get_unused_from_slot(rooted_slot: Slot, unused: u64) -> u64
Unused conversion
pub fn clock(&self) -> Clock
pub fn get_slot_history(&self) -> SlotHistory
pub fn epoch_duration_in_years(&self, prev_epoch: Epoch) -> f64
pub fn slot_in_year_for_inflation(&self) -> f64
pub fn update_recent_blockhashes(&self)
pub fn rehash(&self)
pub fn freeze(&self)
pub fn exhaustively_free_unused_resource(&self)
pub fn epoch_schedule(&self) -> &EpochSchedule
sourcepub fn squash(&self) -> SquashTiming
pub fn squash(&self) -> SquashTiming
squash the parent’s state up into this Bank, this Bank becomes a root
sourcepub fn parent(&self) -> Option<Arc<Bank>>
pub fn parent(&self) -> Option<Arc<Bank>>
Return the more recent checkpoint of this bank instance.
pub fn parent_slot(&self) -> Slot
pub fn parent_hash(&self) -> Hash
pub fn add_native_program(
&self,
name: &str,
program_id: &Pubkey,
must_replace: bool
)
pub fn set_rent_burn_percentage(&mut self, burn_percent: u8)
pub fn set_hashes_per_tick(&mut self, hashes_per_tick: Option<u64>)
sourcepub fn last_blockhash(&self) -> Hash
pub fn last_blockhash(&self) -> Hash
Return the last block hash registered.
pub fn get_minimum_balance_for_rent_exemption(&self, data_len: usize) -> u64
pub fn last_blockhash_with_fee_calculator(&self) -> (Hash, FeeCalculator)
pub fn get_fee_calculator(&self, hash: &Hash) -> Option<FeeCalculator>
pub fn get_fee_rate_governor(&self) -> &FeeRateGovernor
pub fn get_blockhash_last_valid_slot(&self, blockhash: &Hash) -> Option<Slot>
Please use get_blockhash_last_valid_block_height
pub fn get_blockhash_last_valid_block_height(
&self,
blockhash: &Hash
) -> Option<Slot>
pub fn confirmed_last_blockhash(&self) -> (Hash, FeeCalculator)
sourcepub fn clear_signatures(&self)
pub fn clear_signatures(&self)
Forget all signatures. Useful for benchmarking.
pub fn clear_slot_signatures(&self, slot: Slot)
pub fn can_commit(result: &Result<()>) -> bool
sourcepub fn register_tick(&self, hash: &Hash)
pub fn register_tick(&self, hash: &Hash)
Tell the bank which Entry IDs exist on the ledger. This function
assumes subsequent calls correspond to later entries, and will boot
the oldest ones once its internal cache is full. Once boot, the
bank will reject transactions using that hash
.
pub fn is_complete(&self) -> bool
pub fn is_block_boundary(&self, tick_height: u64) -> bool
pub fn prepare_batch<'a, 'b>(
&'a self,
txs: impl Iterator<Item = &'b Transaction>
) -> TransactionBatch<'a, 'b>
pub fn prepare_hashed_batch<'a, 'b>(
&'a self,
hashed_txs: &'b [HashedTransaction<'_>]
) -> TransactionBatch<'a, 'b>
sourcepub fn simulate_transaction(
&self,
transaction: &Transaction
) -> (Result<()>, TransactionLogMessages, Vec<(Pubkey, AccountSharedData)>)
pub fn simulate_transaction(
&self,
transaction: &Transaction
) -> (Result<()>, TransactionLogMessages, Vec<(Pubkey, AccountSharedData)>)
Run transactions against a frozen bank without committing the results
pub fn unlock_accounts(&self, batch: &mut TransactionBatch<'_, '_>)
pub fn remove_unrooted_slots(&self, slots: &[(Slot, BankId)])
pub fn set_shrink_paths(&self, paths: Vec<PathBuf>)
pub fn check_hash_age(&self, hash: &Hash, max_age: usize) -> Option<bool>
pub fn check_tx_durable_nonce(
&self,
tx: &Transaction
) -> Option<(Pubkey, AccountSharedData)>
pub fn check_transactions(
&self,
hashed_txs: &[HashedTransaction<'_>],
lock_results: &[Result<()>],
max_age: usize,
error_counters: &mut ErrorCounters
) -> Vec<TransactionCheckResult>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn collect_balances(
&self,
batch: &TransactionBatch<'_, '_>
) -> TransactionBalances
pub fn load_and_execute_transactions(
&self,
batch: &TransactionBatch<'_, '_>,
max_age: usize,
enable_cpi_recording: bool,
enable_log_recording: bool,
timings: &mut ExecuteTimings
) -> LoadAndExecuteTransactionsOutput
sourcepub fn commit_transactions(
&self,
hashed_txs: &[HashedTransaction<'_>],
loaded_txs: &mut [TransactionLoadResult],
execution_results: Vec<TransactionExecutionResult>,
committed_transactions_count: u64,
committed_with_failure_result_count: u64,
signature_count: u64,
timings: &mut ExecuteTimings
) -> TransactionResults
pub fn commit_transactions(
&self,
hashed_txs: &[HashedTransaction<'_>],
loaded_txs: &mut [TransactionLoadResult],
execution_results: Vec<TransactionExecutionResult>,
committed_transactions_count: u64,
committed_with_failure_result_count: u64,
signature_count: u64,
timings: &mut ExecuteTimings
) -> TransactionResults
committed_transactions_count
is the number of transactions out of sanitized_txs
that was executed. Of those, committed_transactions_count
,
committed_with_failure_result_count
is the number of executed transactions that returned
a failure result.
pub fn cluster_type(&self) -> ClusterType
sourcepub fn load_execute_and_commit_transactions(
&self,
batch: &TransactionBatch<'_, '_>,
max_age: usize,
collect_balances: bool,
enable_cpi_recording: bool,
enable_log_recording: bool,
timings: &mut ExecuteTimings
) -> (TransactionResults, TransactionBalancesSet, Vec<Option<InnerInstructionsList>>, Vec<Option<TransactionLogMessages>>)
pub fn load_execute_and_commit_transactions(
&self,
batch: &TransactionBatch<'_, '_>,
max_age: usize,
collect_balances: bool,
enable_cpi_recording: bool,
enable_log_recording: bool,
timings: &mut ExecuteTimings
) -> (TransactionResults, TransactionBalancesSet, Vec<Option<InnerInstructionsList>>, Vec<Option<TransactionLogMessages>>)
Process a batch of transactions.
sourcepub fn process_transaction(&self, tx: &Transaction) -> Result<()>
pub fn process_transaction(&self, tx: &Transaction) -> Result<()>
Process a Transaction. This is used for unit tests and simply calls the vector Bank::process_transactions method
pub fn process_transactions(&self, txs: &[Transaction]) -> Vec<Result<()>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourcepub fn transfer(
&self,
n: u64,
keypair: &Keypair,
to: &Pubkey
) -> Result<Signature>
pub fn transfer(
&self,
n: u64,
keypair: &Keypair,
to: &Pubkey
) -> Result<Signature>
Create, sign, and process a Transaction from keypair
to to
of
n
lamports where blockhash
is the last Entry ID observed by the client.
pub fn read_balance(account: &AccountSharedData) -> u64
sourcepub fn get_balance(&self, pubkey: &Pubkey) -> u64
pub fn get_balance(&self, pubkey: &Pubkey) -> u64
Each program would need to be able to introspect its own state this is hard-coded to the Budget language
sourcepub fn parents(&self) -> Vec<Arc<Bank>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn parents(&self) -> Vec<Arc<Bank>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Compute all the parents of the bank in order
sourcepub fn parents_inclusive(self: Arc<Self>) -> Vec<Arc<Bank>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn parents_inclusive(self: Arc<Self>) -> Vec<Arc<Bank>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Compute all the parents of the bank including this bank itself
pub fn store_account(&self, pubkey: &Pubkey, account: &AccountSharedData)
pub fn force_flush_accounts_cache(&self)
pub fn flush_accounts_cache_if_needed(&self)
pub fn expire_old_recycle_stores(&self)
pub fn deposit(
&self,
pubkey: &Pubkey,
lamports: u64
) -> Result<u64, LamportsError>
pub fn accounts(&self) -> Arc<Accounts>
pub fn set_inflation(&self, inflation: Inflation)
pub fn set_bpf_compute_budget(
&mut self,
bpf_compute_budget: Option<BpfComputeBudget>
)
pub fn hard_forks(&self) -> Arc<RwLock<HardForks>>
pub fn get_account(&self, pubkey: &Pubkey) -> Option<AccountSharedData>
pub fn get_account_with_fixed_root(
&self,
pubkey: &Pubkey
) -> Option<AccountSharedData>
pub fn get_account_modified_slot(
&self,
pubkey: &Pubkey
) -> Option<(AccountSharedData, Slot)>
pub fn get_program_accounts(
&self,
program_id: &Pubkey
) -> ScanResult<Vec<(Pubkey, AccountSharedData)>>
pub fn get_filtered_program_accounts<F: Fn(&AccountSharedData) -> bool>(
&self,
program_id: &Pubkey,
filter: F
) -> ScanResult<Vec<(Pubkey, AccountSharedData)>>
pub fn get_filtered_indexed_accounts<F: Fn(&AccountSharedData) -> bool>(
&self,
index_key: &IndexKey,
filter: F
) -> ScanResult<Vec<(Pubkey, AccountSharedData)>>
pub fn account_indexes_include_key(&self, key: &Pubkey) -> bool
pub fn get_all_accounts_with_modified_slots(
&self
) -> ScanResult<Vec<(Pubkey, AccountSharedData, Slot)>>
pub fn get_program_accounts_modified_since_parent(
&self,
program_id: &Pubkey
) -> Vec<(Pubkey, AccountSharedData)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_transaction_logs(
&self,
address: Option<&Pubkey>
) -> Option<Vec<TransactionLogInfo>>
pub fn get_all_accounts_modified_since_parent(
&self
) -> Vec<(Pubkey, AccountSharedData)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_largest_accounts(
&self,
num: usize,
filter_by_address: &HashSet<Pubkey>,
filter: AccountAddressFilter
) -> ScanResult<Vec<(Pubkey, u64)>>
pub fn transaction_count(&self) -> u64
pub fn transaction_error_count(&self) -> u64
pub fn transaction_entries_count(&self) -> u64
pub fn transactions_per_entry_max(&self) -> u64
pub fn signature_count(&self) -> u64
pub fn get_signature_status_processed_since_parent(
&self,
signature: &Signature
) -> Option<Result<()>>
pub fn get_signature_status_with_blockhash(
&self,
signature: &Signature,
blockhash: &Hash
) -> Option<Result<()>>
pub fn get_signature_status_slot(
&self,
signature: &Signature
) -> Option<(Slot, Result<()>)>
pub fn get_signature_status(&self, signature: &Signature) -> Option<Result<()>>
pub fn has_signature(&self, signature: &Signature) -> bool
pub fn get_snapshot_storages(&self) -> SnapshotStorages
pub fn calculate_capitalization(&self, debug_verify: bool) -> u64
pub fn calculate_and_verify_capitalization(&self, debug_verify: bool) -> bool
sourcepub fn set_capitalization(&self) -> u64
pub fn set_capitalization(&self) -> u64
Forcibly overwrites current capitalization by actually recalculating accounts’ balances. This should only be used for developing purposes.
pub fn get_accounts_hash(&self) -> Hash
pub fn get_thread_pool(&self) -> &ThreadPool
pub fn update_accounts_hash_with_index_option(
&self,
use_index: bool,
debug_verify: bool,
slots_per_epoch: Option<Slot>
) -> Hash
pub fn update_accounts_hash(&self) -> Hash
sourcepub fn verify_snapshot_bank(
&self,
test_hash_calculation: bool,
accounts_db_skip_shrink: bool
) -> bool
pub fn verify_snapshot_bank(
&self,
test_hash_calculation: bool,
accounts_db_skip_shrink: bool
) -> bool
A snapshot bank should be purged of 0 lamport accounts which are not part of the hash calculation and could shield other real accounts.
sourcepub fn hashes_per_tick(&self) -> &Option<u64>
pub fn hashes_per_tick(&self) -> &Option<u64>
Return the number of hashes per tick
sourcepub fn ticks_per_slot(&self) -> u64
pub fn ticks_per_slot(&self) -> u64
Return the number of ticks per slot
sourcepub fn slots_per_year(&self) -> f64
pub fn slots_per_year(&self) -> f64
Return the number of slots per year
sourcepub fn tick_height(&self) -> u64
pub fn tick_height(&self) -> u64
Return the number of ticks since genesis.
pub fn rent_collector(&self) -> RentCollector
sourcepub fn capitalization(&self) -> u64
pub fn capitalization(&self) -> u64
Return the total capitalization of the Bank
sourcepub fn max_tick_height(&self) -> u64
pub fn max_tick_height(&self) -> u64
Return this bank’s max_tick_height
sourcepub fn block_height(&self) -> u64
pub fn block_height(&self) -> u64
Return the block_height of this bank
sourcepub fn get_slots_in_epoch(&self, epoch: Epoch) -> u64
pub fn get_slots_in_epoch(&self, epoch: Epoch) -> u64
Return the number of slots per epoch for the given epoch
sourcepub fn get_leader_schedule_epoch(&self, slot: Slot) -> Epoch
pub fn get_leader_schedule_epoch(&self, slot: Slot) -> Epoch
returns the epoch for which this bank’s leader_schedule_slot_offset and slot would need to cache leader_schedule
sourcepub fn cloned_stake_delegations(&self) -> HashMap<Pubkey, Delegation>
pub fn cloned_stake_delegations(&self) -> HashMap<Pubkey, Delegation>
current stake delegations for this bank
pub fn staked_nodes(&self) -> Arc<HashMap<Pubkey, u64>>
sourcepub fn vote_accounts(&self) -> Arc<HashMap<Pubkey, (u64, VoteAccount)>>
pub fn vote_accounts(&self) -> Arc<HashMap<Pubkey, (u64, VoteAccount)>>
current vote accounts for this bank along with the stake attributed to each account Note: This clones the entire vote-accounts hashmap. For a single account lookup use get_vote_account instead.
sourcepub fn get_vote_account(
&self,
vote_account: &Pubkey
) -> Option<(u64, VoteAccount)>
pub fn get_vote_account(
&self,
vote_account: &Pubkey
) -> Option<(u64, VoteAccount)>
Vote account for the given vote account pubkey along with the stake.
sourcepub fn epoch_stakes(&self, epoch: Epoch) -> Option<&EpochStakes>
pub fn epoch_stakes(&self, epoch: Epoch) -> Option<&EpochStakes>
Get the EpochStakes for a given epoch
pub fn epoch_stakes_map(&self) -> &HashMap<Epoch, EpochStakes>
pub fn epoch_staked_nodes(
&self,
epoch: Epoch
) -> Option<Arc<HashMap<Pubkey, u64>>>
sourcepub fn epoch_vote_accounts(
&self,
epoch: Epoch
) -> Option<&HashMap<Pubkey, (u64, VoteAccount)>>
pub fn epoch_vote_accounts(
&self,
epoch: Epoch
) -> Option<&HashMap<Pubkey, (u64, VoteAccount)>>
vote accounts for the specific epoch along with the stake attributed to each account
Get the fixed authorized voter for the given vote account for the current epoch
sourcepub fn epoch_vote_accounts_for_node_id(
&self,
node_id: &Pubkey
) -> Option<&NodeVoteAccounts>
pub fn epoch_vote_accounts_for_node_id(
&self,
node_id: &Pubkey
) -> Option<&NodeVoteAccounts>
Get the fixed set of vote accounts for the given node id for the current epoch
sourcepub fn total_epoch_stake(&self) -> u64
pub fn total_epoch_stake(&self) -> u64
Get the fixed total stake of all vote accounts for current epoch
sourcepub fn epoch_vote_account_stake(&self, vote_account: &Pubkey) -> u64
pub fn epoch_vote_account_stake(&self, vote_account: &Pubkey) -> u64
Get the fixed stake of the given vote account for the current epoch
sourcepub fn get_epoch_and_slot_index(&self, slot: Slot) -> (Epoch, SlotIndex)
pub fn get_epoch_and_slot_index(&self, slot: Slot) -> (Epoch, SlotIndex)
given a slot, return the epoch and offset into the epoch this slot falls e.g. with a fixed number for slots_per_epoch, the calculation is simply:
( slot/slots_per_epoch, slot % slots_per_epoch )
pub fn get_epoch_info(&self) -> EpochInfo
pub fn is_empty(&self) -> bool
sourcepub fn add_builtin(
&mut self,
name: &str,
program_id: Pubkey,
process_instruction_with_context: ProcessInstructionWithContext
)
pub fn add_builtin(
&mut self,
name: &str,
program_id: Pubkey,
process_instruction_with_context: ProcessInstructionWithContext
)
Add an instruction processor to intercept instructions before the dynamic loader.
sourcepub fn replace_builtin(
&mut self,
name: &str,
program_id: Pubkey,
process_instruction_with_context: ProcessInstructionWithContext
)
pub fn replace_builtin(
&mut self,
name: &str,
program_id: Pubkey,
process_instruction_with_context: ProcessInstructionWithContext
)
Replace a builtin instruction processor if it already exists
pub fn clean_accounts(&self, skip_last: bool, is_startup: bool)
pub fn shrink_all_slots(&self, is_startup: bool)
pub fn print_accounts_stats(&self)
pub fn process_stale_slot_with_budget(
&self,
consumed_budget: usize,
budget_recovery_delta: usize
) -> usize
pub fn bank_tranaction_count_fix_enabled(&self) -> bool
pub fn shrink_candidate_slots(&self) -> usize
pub fn no_overflow_rent_distribution_enabled(&self) -> bool
pub fn verify_tx_signatures_len_enabled(&self) -> bool
pub fn merge_nonce_error_into_system_error(&self) -> bool
pub fn stake_program_advance_activating_credits_observed(&self) -> bool
pub fn demote_program_write_locks(&self) -> bool
pub fn stakes_remove_delegation_if_inactive_enabled(&self) -> bool
pub fn send_to_tpu_vote_port_enabled(&self) -> bool
pub fn read_cost_tracker(&self) -> LockResult<RwLockReadGuard<'_, CostTracker>>
pub fn write_cost_tracker(
&self
) -> LockResult<RwLockWriteGuard<'_, CostTracker>>
pub fn should_bank_still_be_processing_txs(
bank_creation_time: &Instant,
max_tx_ingestion_nanos: u128
) -> bool
pub fn deactivate_feature(&mut self, id: &Pubkey)
pub fn activate_feature(&mut self, id: &Pubkey)
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Bank
impl Send for Bank
impl Sync for Bank
impl Unpin for Bank
impl !UnwindSafe for Bank
Blanket Implementations
sourceimpl<T> AbiExample for T
impl<T> AbiExample for T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub 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