Struct runtime::InterBtcParachain
source · pub struct InterBtcParachain {
pub native_currency_id: CurrencyId,
pub relay_chain_currency_id: CurrencyId,
pub wrapped_currency_id: CurrencyId,
/* private fields */
}
Fields§
§native_currency_id: CurrencyId
§relay_chain_currency_id: CurrencyId
§wrapped_currency_id: CurrencyId
Implementations§
source§impl InterBtcParachain
impl InterBtcParachain
pub async fn new<P: RpcClientT>( rpc_client: P, signer: InterBtcSigner, shutdown_tx: ShutdownSender ) -> Result<Self, Error>
pub async fn from_url( url: &str, signer: InterBtcSigner, shutdown_tx: ShutdownSender ) -> Result<Self, Error>
pub async fn from_url_with_retry( url: &str, signer: InterBtcSigner, connection_timeout: Duration, shutdown_tx: ShutdownSender ) -> Result<Self, Error>
pub async fn from_url_and_config_with_retry( url: &str, signer: InterBtcSigner, max_concurrent_requests: Option<usize>, max_notifs_per_subscription: Option<usize>, connection_timeout: Duration, shutdown_tx: ShutdownSender ) -> Result<Self, Error>
pub async fn get_finalized_block_hash(&self) -> Result<H256, Error>
sourcepub async fn on_block<F, R>(&self, on_block: F) -> Result<(), Error>where
F: Fn(InterBtcHeader) -> R,
R: Future<Output = Result<(), Error>>,
pub async fn on_block<F, R>(&self, on_block: F) -> Result<(), Error>where F: Fn(InterBtcHeader) -> R, R: Future<Output = Result<(), Error>>,
Subscribe to new parachain blocks.
sourcepub async fn wait_for_block(&self, height: u32) -> Result<(), Error>
pub async fn wait_for_block(&self, height: u32) -> Result<(), Error>
Wait for the block at the given height Note: will always wait at least one block.
sourcepub async fn delay_for_blocks(&self, delay: u32) -> Result<(), Error>
pub async fn delay_for_blocks(&self, delay: u32) -> Result<(), Error>
Sleep for delay
parachain blocks
sourcepub async fn on_event_error<E: Fn(Error)>(
&self,
on_error: E
) -> Result<(), Error>
pub async fn on_event_error<E: Fn(Error)>( &self, on_error: E ) -> Result<(), Error>
Subscription service that should listen forever, only returns if the initial subscription
cannot be established. Calls on_error
when an error event has been received, or when an
event has been received that failed to be decoded into a raw event.
Arguments
on_error
- callback for decoding errors, is not allowed to take too long
sourcepub async fn on_event<T, F, R, E>(
&self,
on_event: F,
on_error: E
) -> Result<(), Error>where
T: StaticEvent + Debug,
F: FnMut(T) -> R,
R: Future<Output = ()>,
E: Fn(Error),
pub async fn on_event<T, F, R, E>( &self, on_event: F, on_error: E ) -> Result<(), Error>where T: StaticEvent + Debug, F: FnMut(T) -> R, R: Future<Output = ()>, E: Fn(Error),
Subscription service that should listen forever, only returns if the initial subscription
cannot be established. This function uses two concurrent tasks: one for the event listener,
and one that calls the given callback. This allows the callback to take a long time to
complete without breaking the rpc communication, which could otherwise happen. Still, since
the queue of callbacks is processed sequentially, some care should be taken that the queue
does not overflow. on_error
is called when the event has successfully been decoded into a
raw_event, but failed to decode into an event of type T
Arguments
on_event
- callback for events, is allowed to sometimes take a longer timeon_error
- callback for decoding error, is not allowed to take too long
pub async fn store_assets_metadata(&self) -> Result<(), Error>
pub async fn store_lend_tokens(&self) -> Result<(), Error>
sourcepub async fn listen_for_registered_assets(&self) -> Result<(), Error>
pub async fn listen_for_registered_assets(&self) -> Result<(), Error>
Cache registered assets and updates
sourcepub async fn listen_for_lending_markets(&self) -> Result<(), Error>
pub async fn listen_for_lending_markets(&self) -> Result<(), Error>
Cache new markets and updates
sourcepub async fn listen_for_fee_rate_changes(&self) -> Result<(), Error>
pub async fn listen_for_fee_rate_changes(&self) -> Result<(), Error>
Listen to fee_rate changes and broadcast new values on the fee_rate_update_tx channel
Trait Implementations§
source§impl BtcRelayPallet for InterBtcParachain
impl BtcRelayPallet for InterBtcParachain
source§fn get_best_block<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<H256Le, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_best_block<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<H256Le, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get the hash of the current best tip.
source§fn get_best_block_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_best_block_height<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get the current best known height.
source§fn get_block_hash<'life0, 'async_trait>(
&'life0 self,
height: u32
) -> Pin<Box<dyn Future<Output = Result<H256Le, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_hash<'life0, 'async_trait>( &'life0 self, height: u32 ) -> Pin<Box<dyn Future<Output = Result<H256Le, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§fn get_block_header<'life0, 'async_trait>(
&'life0 self,
hash: H256Le
) -> Pin<Box<dyn Future<Output = Result<InterBtcRichBlockHeader, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_header<'life0, 'async_trait>( &'life0 self, hash: H256Le ) -> Pin<Box<dyn Future<Output = Result<InterBtcRichBlockHeader, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§fn get_bitcoin_confirmations<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_bitcoin_confirmations<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get the global security parameter k for stable Bitcoin transactions
source§fn get_parachain_confirmations<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BlockNumber, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_parachain_confirmations<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<BlockNumber, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get the global security parameter for stable parachain confirmations
source§fn wait_for_block_in_relay<'life0, 'async_trait>(
&'life0 self,
block_hash: H256Le,
_btc_confirmations: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_for_block_in_relay<'life0, 'async_trait>( &'life0 self, block_hash: H256Le, _btc_confirmations: Option<BlockNumber> ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Wait until Bitcoin block is submitted to the relay
source§fn verify_block_header_inclusion<'life0, 'async_trait>(
&'life0 self,
block_hash: H256Le
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn verify_block_header_inclusion<'life0, 'async_trait>( &'life0 self, block_hash: H256Le ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
check that the block with the given block is included in the main chain of the relay, with sufficient confirmations
source§fn initialize_btc_relay<'life0, 'async_trait>(
&'life0 self,
header: RawBlockHeader,
height: BitcoinBlockHeight
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize_btc_relay<'life0, 'async_trait>( &'life0 self, header: RawBlockHeader, height: BitcoinBlockHeight ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Initializes the relay with the provided block header and height,
should be called automatically by relayer subject to the
result of is_initialized
.
Arguments
header
- raw block headerheight
- starting height
source§fn store_block_header<'life0, 'async_trait>(
&'life0 self,
header: RawBlockHeader
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store_block_header<'life0, 'async_trait>( &'life0 self, header: RawBlockHeader ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§impl Clone for InterBtcParachain
impl Clone for InterBtcParachain
source§fn clone(&self) -> InterBtcParachain
fn clone(&self) -> InterBtcParachain
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl CollateralBalancesPallet for InterBtcParachain
impl CollateralBalancesPallet for InterBtcParachain
fn get_free_balance<'life0, 'async_trait>( &'life0 self, currency_id: CurrencyId ) -> Pin<Box<dyn Future<Output = Result<Balance, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_free_balance_for_id<'life0, 'async_trait>( &'life0 self, id: AccountId, currency_id: CurrencyId ) -> Pin<Box<dyn Future<Output = Result<Balance, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_reserved_balance<'life0, 'async_trait>( &'life0 self, currency_id: CurrencyId ) -> Pin<Box<dyn Future<Output = Result<Balance, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_reserved_balance_for_id<'life0, 'async_trait>( &'life0 self, id: AccountId, currency_id: CurrencyId ) -> Pin<Box<dyn Future<Output = Result<Balance, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn transfer_to<'life0, 'life1, 'async_trait>( &'life0 self, recipient: &'life1 AccountId, amounts: Vec<(u128, CurrencyId)> ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§impl FeePallet for InterBtcParachain
impl FeePallet for InterBtcParachain
fn get_issue_griefing_collateral<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<FixedU128, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_issue_fee<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<FixedU128, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_replace_griefing_collateral<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<FixedU128, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§impl IssuePallet for InterBtcParachain
impl IssuePallet for InterBtcParachain
source§fn request_issue<'life0, 'life1, 'async_trait>(
&'life0 self,
amount: u128,
vault_id: &'life1 VaultId
) -> Pin<Box<dyn Future<Output = Result<RequestIssueEvent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn request_issue<'life0, 'life1, 'async_trait>( &'life0 self, amount: u128, vault_id: &'life1 VaultId ) -> Pin<Box<dyn Future<Output = Result<RequestIssueEvent, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§fn execute_issue<'life0, 'life1, 'async_trait>(
&'life0 self,
issue_id: H256,
raw_proof: &'life1 RawTransactionProof
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_issue<'life0, 'life1, 'async_trait>( &'life0 self, issue_id: H256, raw_proof: &'life1 RawTransactionProof ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§fn cancel_issue<'life0, 'async_trait>(
&'life0 self,
issue_id: H256
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_issue<'life0, 'async_trait>( &'life0 self, issue_id: H256 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_issue_request<'life0, 'async_trait>( &'life0 self, issue_id: H256 ) -> Pin<Box<dyn Future<Output = Result<InterBtcIssueRequest, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_vault_issue_requests<'life0, 'async_trait>( &'life0 self, account_id: AccountId ) -> Pin<Box<dyn Future<Output = Result<Vec<(H256, InterBtcIssueRequest)>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_issue_period<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_all_active_issues<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<(H256, InterBtcIssueRequest)>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§impl OraclePallet for InterBtcParachain
impl OraclePallet for InterBtcParachain
source§fn get_exchange_rate<'life0, 'async_trait>(
&'life0 self,
currency_id: CurrencyId
) -> Pin<Box<dyn Future<Output = Result<FixedU128, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_exchange_rate<'life0, 'async_trait>( &'life0 self, currency_id: CurrencyId ) -> Pin<Box<dyn Future<Output = Result<FixedU128, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns the last exchange rate in planck per satoshis, the time at which it was set and the configured max delay.
source§fn feed_values<'life0, 'async_trait>(
&'life0 self,
values: Vec<(OracleKey, FixedU128)>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn feed_values<'life0, 'async_trait>( &'life0 self, values: Vec<(OracleKey, FixedU128)> ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§fn set_bitcoin_fees<'life0, 'async_trait>(
&'life0 self,
value: FixedU128
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_bitcoin_fees<'life0, 'async_trait>( &'life0 self, value: FixedU128 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Sets the estimated Satoshis per bytes required to get a Bitcoin transaction included in in the next block (~10 min)
Arguments
value
- the estimated fee rate
source§fn get_bitcoin_fees<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<FixedU128, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_bitcoin_fees<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<FixedU128, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Gets the estimated Satoshis per bytes required to get a Bitcoin transaction included in in the next x blocks
source§fn wrapped_to_collateral<'life0, 'async_trait>(
&'life0 self,
amount: u128,
currency_id: CurrencyId
) -> Pin<Box<dyn Future<Output = Result<u128, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wrapped_to_collateral<'life0, 'async_trait>( &'life0 self, amount: u128, currency_id: CurrencyId ) -> Pin<Box<dyn Future<Output = Result<u128, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Converts the amount in btc to dot, based on the current set exchange rate.
source§fn collateral_to_wrapped<'life0, 'async_trait>(
&'life0 self,
amount: u128,
currency_id: CurrencyId
) -> Pin<Box<dyn Future<Output = Result<u128, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn collateral_to_wrapped<'life0, 'async_trait>( &'life0 self, amount: u128, currency_id: CurrencyId ) -> Pin<Box<dyn Future<Output = Result<u128, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Converts the amount in dot to btc, based on the current set exchange rate.
fn has_updated<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 OracleKey ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn on_fee_rate_change(&self) -> FeeRateUpdateReceiver
source§impl RedeemPallet for InterBtcParachain
impl RedeemPallet for InterBtcParachain
source§fn request_redeem<'life0, 'life1, 'async_trait>(
&'life0 self,
amount: u128,
btc_address: BtcAddress,
vault_id: &'life1 VaultId
) -> Pin<Box<dyn Future<Output = Result<H256, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn request_redeem<'life0, 'life1, 'async_trait>( &'life0 self, amount: u128, btc_address: BtcAddress, vault_id: &'life1 VaultId ) -> Pin<Box<dyn Future<Output = Result<H256, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§fn execute_redeem<'life0, 'life1, 'async_trait>(
&'life0 self,
redeem_id: H256,
raw_proof: &'life1 RawTransactionProof
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_redeem<'life0, 'life1, 'async_trait>( &'life0 self, redeem_id: H256, raw_proof: &'life1 RawTransactionProof ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§fn cancel_redeem<'life0, 'async_trait>(
&'life0 self,
redeem_id: H256,
reimburse: bool
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_redeem<'life0, 'async_trait>( &'life0 self, redeem_id: H256, reimburse: bool ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_redeem_request<'life0, 'async_trait>( &'life0 self, redeem_id: H256 ) -> Pin<Box<dyn Future<Output = Result<InterBtcRedeemRequest, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§fn get_vault_redeem_requests<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId
) -> Pin<Box<dyn Future<Output = Result<Vec<(H256, InterBtcRedeemRequest)>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_vault_redeem_requests<'life0, 'async_trait>( &'life0 self, account_id: AccountId ) -> Pin<Box<dyn Future<Output = Result<Vec<(H256, InterBtcRedeemRequest)>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_redeem_period<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<BlockNumber, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§impl ReplacePallet for InterBtcParachain
impl ReplacePallet for InterBtcParachain
source§fn get_new_vault_replace_requests<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId
) -> Pin<Box<dyn Future<Output = Result<Vec<(H256, InterBtcReplaceRequest)>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_new_vault_replace_requests<'life0, 'async_trait>( &'life0 self, account_id: AccountId ) -> Pin<Box<dyn Future<Output = Result<Vec<(H256, InterBtcReplaceRequest)>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get all replace requests accepted by the given vault
source§fn get_old_vault_replace_requests<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId
) -> Pin<Box<dyn Future<Output = Result<Vec<(H256, InterBtcReplaceRequest)>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_old_vault_replace_requests<'life0, 'async_trait>( &'life0 self, account_id: AccountId ) -> Pin<Box<dyn Future<Output = Result<Vec<(H256, InterBtcReplaceRequest)>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get all replace requests made by the given vault
source§fn request_replace<'life0, 'life1, 'async_trait>(
&'life0 self,
vault_id: &'life1 VaultId,
amount: u128
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn request_replace<'life0, 'life1, 'async_trait>( &'life0 self, vault_id: &'life1 VaultId, amount: u128 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§fn withdraw_replace<'life0, 'life1, 'async_trait>(
&'life0 self,
vault_id: &'life1 VaultId,
amount: u128
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn withdraw_replace<'life0, 'life1, 'async_trait>( &'life0 self, vault_id: &'life1 VaultId, amount: u128 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§fn accept_replace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
new_vault: &'life1 VaultId,
old_vault: &'life2 VaultId,
amount_btc: u128,
collateral: u128,
btc_address: BtcAddress
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn accept_replace<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, new_vault: &'life1 VaultId, old_vault: &'life2 VaultId, amount_btc: u128, collateral: u128, btc_address: BtcAddress ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
source§fn execute_replace<'life0, 'life1, 'async_trait>(
&'life0 self,
replace_id: H256,
raw_proof: &'life1 RawTransactionProof
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_replace<'life0, 'life1, 'async_trait>( &'life0 self, replace_id: H256, raw_proof: &'life1 RawTransactionProof ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§fn cancel_replace<'life0, 'async_trait>(
&'life0 self,
replace_id: H256
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_replace<'life0, 'async_trait>( &'life0 self, replace_id: H256 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§fn get_replace_period<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_replace_period<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§impl SecurityPallet for InterBtcParachain
impl SecurityPallet for InterBtcParachain
source§impl SudoPallet for InterBtcParachain
impl SudoPallet for InterBtcParachain
source§fn set_parachain_confirmations<'life0, 'async_trait>(
&'life0 self,
value: BlockNumber
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_parachain_confirmations<'life0, 'async_trait>( &'life0 self, value: BlockNumber ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Set the global security parameter for stable parachain confirmations
source§fn set_bitcoin_confirmations<'life0, 'async_trait>(
&'life0 self,
value: u32
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_bitcoin_confirmations<'life0, 'async_trait>( &'life0 self, value: u32 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Set the global security parameter k for stable Bitcoin transactions
Adds a new authorized oracle with the given name and the signer’s AccountId
Arguments
account_id
- The Account ID of the new oraclename
- The name of the new oracle
fn sudo<'life0, 'async_trait>( &'life0 self, call: EncodedCall ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn set_storage<'life0, 'life1, 'life2, 'async_trait, V>( &'life0 self, module: &'life1 str, key: &'life2 str, value: V ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where V: 'async_trait + Encode + Send + Sync, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
fn set_redeem_period<'life0, 'async_trait>( &'life0 self, period: BlockNumber ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn disable_difficulty_check<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn set_issue_period<'life0, 'async_trait>( &'life0 self, period: u32 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn set_replace_period<'life0, 'async_trait>( &'life0 self, period: u32 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn set_balances<'life0, 'async_trait>( &'life0 self, amounts: Vec<(AccountId, u128, u128, CurrencyId)> ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§impl TimestampPallet for InterBtcParachain
impl TimestampPallet for InterBtcParachain
source§impl UtilFuncs for InterBtcParachain
impl UtilFuncs for InterBtcParachain
source§fn get_current_chain_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_current_chain_height<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_rpc_properties<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Map<String, Value>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§fn get_native_currency_id(&self) -> CurrencyId
fn get_native_currency_id(&self) -> CurrencyId
source§fn get_account_id(&self) -> &AccountId
fn get_account_id(&self) -> &AccountId
fn is_this_vault(&self, vault_id: &VaultId) -> bool
fn get_foreign_assets_metadata<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<(u32, AssetMetadata)>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_lend_tokens<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<(CurrencyId, CurrencyId)>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_foreign_asset_metadata<'life0, 'async_trait>( &'life0 self, id: u32 ) -> Pin<Box<dyn Future<Output = Result<AssetMetadata, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§impl VaultRegistryPallet for InterBtcParachain
impl VaultRegistryPallet for InterBtcParachain
source§fn get_vault<'life0, 'life1, 'async_trait>(
&'life0 self,
vault_id: &'life1 VaultId
) -> Pin<Box<dyn Future<Output = Result<InterBtcVault, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_vault<'life0, 'life1, 'async_trait>( &'life0 self, vault_id: &'life1 VaultId ) -> Pin<Box<dyn Future<Output = Result<InterBtcVault, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§fn get_all_vaults<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<InterBtcVault>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_vaults<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<InterBtcVault>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Fetch all active vaults.
source§fn register_vault<'life0, 'life1, 'async_trait>(
&'life0 self,
vault_id: &'life1 VaultId,
collateral: u128
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_vault<'life0, 'life1, 'async_trait>( &'life0 self, vault_id: &'life1 VaultId, collateral: u128 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Submit extrinsic to register a vault.
Arguments
collateral
- depositpublic_key
- Bitcoin public key
source§fn deposit_collateral<'life0, 'life1, 'async_trait>(
&'life0 self,
vault_id: &'life1 VaultId,
amount: u128
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn deposit_collateral<'life0, 'life1, 'async_trait>( &'life0 self, vault_id: &'life1 VaultId, amount: u128 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Locks additional collateral as a security against stealing the Bitcoin locked with it.
Arguments
amount
- the amount of extra collateral to lock
source§fn withdraw_collateral<'life0, 'life1, 'async_trait>(
&'life0 self,
vault_id: &'life1 VaultId,
amount: u128
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn withdraw_collateral<'life0, 'life1, 'async_trait>( &'life0 self, vault_id: &'life1 VaultId, amount: u128 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Withdraws amount
of the collateral from the amount locked by
the vault corresponding to the origin account
The collateral left after withdrawal must be more than MinimumCollateralVault
and above the SecureCollateralThreshold. Collateral that is currently
being used to back issued tokens remains locked until the Vault
is used for a redeem request (full release can take multiple redeem requests).
Arguments
amount
- the amount of collateral to withdraw
source§fn register_public_key<'life0, 'async_trait>(
&'life0 self,
public_key: BtcPublicKey
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_public_key<'life0, 'async_trait>( &'life0 self, public_key: BtcPublicKey ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Update the default BTC public key for the vault corresponding to the signer.
Arguments
public_key
- the new public key of the vault
source§fn get_required_collateral_for_wrapped<'life0, 'async_trait>(
&'life0 self,
amount_btc: u128,
collateral_currency: CurrencyId
) -> Pin<Box<dyn Future<Output = Result<u128, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_required_collateral_for_wrapped<'life0, 'async_trait>( &'life0 self, amount_btc: u128, collateral_currency: CurrencyId ) -> Pin<Box<dyn Future<Output = Result<u128, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Custom RPC that calculates the exact collateral required to cover the BTC amount.
Arguments
amount_btc
- amount of btc to cover
source§fn get_required_collateral_for_vault<'life0, 'async_trait>(
&'life0 self,
vault_id: VaultId
) -> Pin<Box<dyn Future<Output = Result<u128, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_required_collateral_for_vault<'life0, 'async_trait>( &'life0 self, vault_id: VaultId ) -> Pin<Box<dyn Future<Output = Result<u128, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get the amount of collateral required for the given vault to be at the current SecureCollateralThreshold with the current exchange rate
source§fn set_current_client_release<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uri: &'life1 [u8],
checksum: &'life2 H256
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_current_client_release<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, uri: &'life1 [u8], checksum: &'life2 H256 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
For testing purposes only. Sets the current vault client release.
Arguments
uri
- URI to the client release binarychecksum
- The SHA256 checksum of the client binary
source§fn set_pending_client_release<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uri: &'life1 [u8],
checksum: &'life2 H256
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_pending_client_release<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, uri: &'life1 [u8], checksum: &'life2 H256 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
For testing purposes only. Sets the pending vault client release.
Arguments
uri
- URI to the client release binarychecksum
- The SHA256 checksum of the client binary
fn get_vaults_by_account_id<'life0, 'life1, 'async_trait>( &'life0 self, account_id: &'life1 AccountId ) -> Pin<Box<dyn Future<Output = Result<Vec<VaultId>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn get_public_key<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Option<BtcPublicKey>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_vault_total_collateral<'life0, 'async_trait>( &'life0 self, vault_id: VaultId ) -> Pin<Box<dyn Future<Output = Result<u128, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn get_collateralization_from_vault<'life0, 'async_trait>( &'life0 self, vault_id: VaultId, only_issued: bool ) -> Pin<Box<dyn Future<Output = Result<u128, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for InterBtcParachain
impl Send for InterBtcParachain
impl Sync for InterBtcParachain
impl Unpin for InterBtcParachain
impl !UnwindSafe for InterBtcParachain
Blanket Implementations§
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where Self: TryInto<T>,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where &'a Self: for<'a> IntoIterator,
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>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere Self: Borrow<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> Rwhere Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere Self: AsMut<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_mut()
into the pipe
function.§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
T
. Read more§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.