Struct bitcoin::Client

pub struct Client { /* private fields */ }
Expand description

Client implements a JSON-RPC client for the Bitcoin Core daemon or compatible APIs.

Implementations§

§

impl Client

pub fn new(url: &str, auth: Auth) -> Result<Client, Error>

Creates a client to a bitcoind JSON-RPC server.

Can only return Err when using cookie authentication.

pub fn from_jsonrpc(client: Client) -> Client

Create a new Client using the given [jsonrpc::Client].

pub fn get_jsonrpc_client(&self) -> &Client

Get the underlying JSONRPC client.

Trait Implementations§

§

impl Debug for Client

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl RpcApi for Client

§

fn call<T>(&self, cmd: &str, args: &[Value]) -> Result<T, Error>where T: for<'a> Deserialize<'a>,

Call an cmd rpc with given args list

§

fn get_by_id<T>(&self, id: &<T as Queryable<Self>>::Id) -> Result<T, Error>where T: Queryable<Self>,

Query an object implementing Querable type
§

fn get_network_info(&self) -> Result<GetNetworkInfoResult, Error>

§

fn get_index_info(&self) -> Result<GetIndexInfoResult, Error>

§

fn version(&self) -> Result<usize, Error>

§

fn add_multisig_address( &self, nrequired: usize, keys: &[PubKeyOrAddress<'_>], label: Option<&str>, address_type: Option<AddressType> ) -> Result<AddMultiSigAddressResult, Error>

§

fn load_wallet(&self, wallet: &str) -> Result<LoadWalletResult, Error>

§

fn unload_wallet( &self, wallet: Option<&str> ) -> Result<Option<UnloadWalletResult>, Error>

§

fn create_wallet( &self, wallet: &str, disable_private_keys: Option<bool>, blank: Option<bool>, passphrase: Option<&str>, avoid_reuse: Option<bool> ) -> Result<LoadWalletResult, Error>

§

fn list_wallets(&self) -> Result<Vec<String, Global>, Error>

§

fn list_wallet_dir(&self) -> Result<Vec<String, Global>, Error>

§

fn get_wallet_info(&self) -> Result<GetWalletInfoResult, Error>

§

fn backup_wallet(&self, destination: Option<&str>) -> Result<(), Error>

§

fn dump_private_key( &self, address: &Address<NetworkChecked> ) -> Result<PrivateKey, Error>

§

fn encrypt_wallet(&self, passphrase: &str) -> Result<(), Error>

§

fn get_difficulty(&self) -> Result<f64, Error>

§

fn get_connection_count(&self) -> Result<usize, Error>

§

fn get_block(&self, hash: &BlockHash) -> Result<Block, Error>

§

fn get_block_hex(&self, hash: &BlockHash) -> Result<String, Error>

§

fn get_block_info(&self, hash: &BlockHash) -> Result<GetBlockResult, Error>

§

fn get_block_header(&self, hash: &BlockHash) -> Result<Header, Error>

§

fn get_block_header_info( &self, hash: &BlockHash ) -> Result<GetBlockHeaderResult, Error>

§

fn get_mining_info(&self) -> Result<GetMiningInfoResult, Error>

§

fn get_block_template( &self, mode: GetBlockTemplateModes, rules: &[GetBlockTemplateRules], capabilities: &[GetBlockTemplateCapabilities] ) -> Result<GetBlockTemplateResult, Error>

§

fn get_blockchain_info(&self) -> Result<GetBlockchainInfoResult, Error>

Returns a data structure containing various state info regarding blockchain processing.
§

fn get_block_count(&self) -> Result<u64, Error>

Returns the numbers of block in the longest chain.
§

fn get_best_block_hash(&self) -> Result<BlockHash, Error>

Returns the hash of the best (tip) block in the longest blockchain.
§

fn get_block_hash(&self, height: u64) -> Result<BlockHash, Error>

Get block hash at a given height
§

fn get_block_stats(&self, height: u64) -> Result<GetBlockStatsResult, Error>

§

fn get_block_stats_fields( &self, height: u64, fields: &[BlockStatsFields] ) -> Result<GetBlockStatsResultPartial, Error>

§

fn get_raw_transaction( &self, txid: &Txid, block_hash: Option<&BlockHash> ) -> Result<Transaction, Error>

§

fn get_raw_transaction_hex( &self, txid: &Txid, block_hash: Option<&BlockHash> ) -> Result<String, Error>

§

fn get_raw_transaction_info( &self, txid: &Txid, block_hash: Option<&BlockHash> ) -> Result<GetRawTransactionResult, Error>

§

fn get_block_filter( &self, block_hash: &BlockHash ) -> Result<GetBlockFilterResult, Error>

§

fn get_balance( &self, minconf: Option<usize>, include_watchonly: Option<bool> ) -> Result<Amount, Error>

§

fn get_balances(&self) -> Result<GetBalancesResult, Error>

§

fn get_received_by_address( &self, address: &Address<NetworkChecked>, minconf: Option<u32> ) -> Result<Amount, Error>

§

fn get_transaction( &self, txid: &Txid, include_watchonly: Option<bool> ) -> Result<GetTransactionResult, Error>

§

fn list_transactions( &self, label: Option<&str>, count: Option<usize>, skip: Option<usize>, include_watchonly: Option<bool> ) -> Result<Vec<ListTransactionResult, Global>, Error>

§

fn list_since_block( &self, blockhash: Option<&BlockHash>, target_confirmations: Option<usize>, include_watchonly: Option<bool>, include_removed: Option<bool> ) -> Result<ListSinceBlockResult, Error>

§

fn get_tx_out( &self, txid: &Txid, vout: u32, include_mempool: Option<bool> ) -> Result<Option<GetTxOutResult>, Error>

§

fn get_tx_out_proof( &self, txids: &[Txid], block_hash: Option<&BlockHash> ) -> Result<Vec<u8, Global>, Error>

§

fn import_public_key( &self, pubkey: &PublicKey, label: Option<&str>, rescan: Option<bool> ) -> Result<(), Error>

§

fn import_private_key( &self, privkey: &PrivateKey, label: Option<&str>, rescan: Option<bool> ) -> Result<(), Error>

§

fn import_address( &self, address: &Address<NetworkChecked>, label: Option<&str>, rescan: Option<bool> ) -> Result<(), Error>

§

fn import_address_script( &self, script: &Script, label: Option<&str>, rescan: Option<bool>, p2sh: Option<bool> ) -> Result<(), Error>

§

fn import_multi( &self, requests: &[ImportMultiRequest<'_>], options: Option<&ImportMultiOptions> ) -> Result<Vec<ImportMultiResult, Global>, Error>

§

fn import_descriptors( &self, req: ImportDescriptors ) -> Result<Vec<ImportMultiResult, Global>, Error>

§

fn set_label( &self, address: &Address<NetworkChecked>, label: &str ) -> Result<(), Error>

§

fn key_pool_refill(&self, new_size: Option<usize>) -> Result<(), Error>

§

fn list_unspent( &self, minconf: Option<usize>, maxconf: Option<usize>, addresses: Option<&[&Address<NetworkChecked>]>, include_unsafe: Option<bool>, query_options: Option<ListUnspentQueryOptions> ) -> Result<Vec<ListUnspentResultEntry, Global>, Error>

§

fn lock_unspent(&self, outputs: &[OutPoint]) -> Result<bool, Error>

To unlock, use [unlock_unspent].
§

fn unlock_unspent(&self, outputs: &[OutPoint]) -> Result<bool, Error>

§

fn unlock_unspent_all(&self) -> Result<bool, Error>

Unlock all unspent UTXOs.
§

fn list_received_by_address( &self, address_filter: Option<&Address<NetworkChecked>>, minconf: Option<u32>, include_empty: Option<bool>, include_watchonly: Option<bool> ) -> Result<Vec<ListReceivedByAddressResult, Global>, Error>

§

fn create_psbt( &self, inputs: &[CreateRawTransactionInput], outputs: &HashMap<String, Amount, RandomState>, locktime: Option<i64>, replaceable: Option<bool> ) -> Result<String, Error>

§

fn create_raw_transaction_hex( &self, utxos: &[CreateRawTransactionInput], outs: &HashMap<String, Amount, RandomState>, locktime: Option<i64>, replaceable: Option<bool> ) -> Result<String, Error>

§

fn create_raw_transaction( &self, utxos: &[CreateRawTransactionInput], outs: &HashMap<String, Amount, RandomState>, locktime: Option<i64>, replaceable: Option<bool> ) -> Result<Transaction, Error>

§

fn decode_raw_transaction<R>( &self, tx: R, is_witness: Option<bool> ) -> Result<DecodeRawTransactionResult, Error>where R: RawTx,

§

fn fund_raw_transaction<R>( &self, tx: R, options: Option<&FundRawTransactionOptions>, is_witness: Option<bool> ) -> Result<FundRawTransactionResult, Error>where R: RawTx,

§

fn sign_raw_transaction<R>( &self, tx: R, utxos: Option<&[SignRawTransactionInput]>, private_keys: Option<&[PrivateKey]>, sighash_type: Option<SigHashType> ) -> Result<SignRawTransactionResult, Error>where R: RawTx,

👎Deprecated
§

fn sign_raw_transaction_with_wallet<R>( &self, tx: R, utxos: Option<&[SignRawTransactionInput]>, sighash_type: Option<SigHashType> ) -> Result<SignRawTransactionResult, Error>where R: RawTx,

§

fn sign_raw_transaction_with_key<R>( &self, tx: R, privkeys: &[PrivateKey], prevtxs: Option<&[SignRawTransactionInput]>, sighash_type: Option<SigHashType> ) -> Result<SignRawTransactionResult, Error>where R: RawTx,

§

fn test_mempool_accept<R>( &self, rawtxs: &[R] ) -> Result<Vec<TestMempoolAcceptResult, Global>, Error>where R: RawTx,

§

fn stop(&self) -> Result<String, Error>

§

fn verify_message( &self, address: &Address<NetworkChecked>, signature: &Signature, message: &str ) -> Result<bool, Error>

§

fn get_new_address( &self, label: Option<&str>, address_type: Option<AddressType> ) -> Result<Address<NetworkUnchecked>, Error>

Generate new address under own control
§

fn get_raw_change_address( &self, address_type: Option<AddressType> ) -> Result<Address<NetworkUnchecked>, Error>

Generate new address for receiving change
§

fn get_address_info( &self, address: &Address<NetworkChecked> ) -> Result<GetAddressInfoResult, Error>

§

fn generate_to_address( &self, block_num: u64, address: &Address<NetworkChecked> ) -> Result<Vec<BlockHash, Global>, Error>

Mine block_num blocks and pay coinbase to address Read more
§

fn generate( &self, block_num: u64, maxtries: Option<u64> ) -> Result<Vec<BlockHash, Global>, Error>

Mine up to block_num blocks immediately (before the RPC call returns) to an address in the wallet.
§

fn invalidate_block(&self, block_hash: &BlockHash) -> Result<(), Error>

Mark a block as invalid by block_hash
§

fn reconsider_block(&self, block_hash: &BlockHash) -> Result<(), Error>

Mark a block as valid by block_hash
§

fn get_mempool_info(&self) -> Result<GetMempoolInfoResult, Error>

Returns details on the active state of the TX memory pool
§

fn get_raw_mempool(&self) -> Result<Vec<Txid, Global>, Error>

Get txids of all transactions in a memory pool
§

fn get_raw_mempool_verbose( &self ) -> Result<HashMap<Txid, GetMempoolEntryResult, RandomState>, Error>

Get details for the transactions in a memory pool
§

fn get_mempool_entry(&self, txid: &Txid) -> Result<GetMempoolEntryResult, Error>

Get mempool data for given transaction
§

fn get_chain_tips(&self) -> Result<Vec<GetChainTipsResultTip, Global>, Error>

Get information about all known tips in the block tree, including the main chain as well as stale branches.
§

fn send_to_address( &self, address: &Address<NetworkChecked>, amount: Amount, comment: Option<&str>, comment_to: Option<&str>, subtract_fee: Option<bool>, replaceable: Option<bool>, confirmation_target: Option<u32>, estimate_mode: Option<EstimateMode> ) -> Result<Txid, Error>

§

fn add_node(&self, addr: &str) -> Result<(), Error>

Attempts to add a node to the addnode list. Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be full nodes/support SegWit as other outbound peers are (though such peers will not be synced from).
§

fn remove_node(&self, addr: &str) -> Result<(), Error>

Attempts to remove a node from the addnode list.
§

fn onetry_node(&self, addr: &str) -> Result<(), Error>

Attempts to connect to a node without permanently adding it to the addnode list.
§

fn disconnect_node(&self, addr: &str) -> Result<(), Error>

Immediately disconnects from the specified peer node.
§

fn disconnect_node_by_id(&self, node_id: u32) -> Result<(), Error>

§

fn get_added_node_info( &self, node: Option<&str> ) -> Result<Vec<GetAddedNodeInfoResult, Global>, Error>

Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here)
§

fn get_node_addresses( &self, count: Option<usize> ) -> Result<Vec<GetNodeAddressesResult, Global>, Error>

Return known addresses which can potentially be used to find new nodes in the network
§

fn list_banned(&self) -> Result<Vec<ListBannedResult, Global>, Error>

List all banned IPs/Subnets.
§

fn clear_banned(&self) -> Result<(), Error>

Clear all banned IPs.
§

fn add_ban(&self, subnet: &str, bantime: u64, absolute: bool) -> Result<(), Error>

Attempts to add an IP/Subnet to the banned list.
§

fn remove_ban(&self, subnet: &str) -> Result<(), Error>

Attempts to remove an IP/Subnet from the banned list.
§

fn set_network_active(&self, state: bool) -> Result<bool, Error>

Disable/enable all p2p network activity.
§

fn get_peer_info(&self) -> Result<Vec<GetPeerInfoResult, Global>, Error>

Returns data about each connected network node as an array of PeerInfo
§

fn ping(&self) -> Result<(), Error>

Requests that a ping be sent to all other nodes, to measure ping time. Read more
§

fn send_raw_transaction<R>(&self, tx: R) -> Result<Txid, Error>where R: RawTx,

§

fn estimate_smart_fee( &self, conf_target: u16, estimate_mode: Option<EstimateMode> ) -> Result<EstimateSmartFeeResult, Error>

§

fn wait_for_new_block(&self, timeout: u64) -> Result<BlockRef, Error>

Waits for a specific new block and returns useful info about it. Returns the current block on timeout or exit. Read more
§

fn wait_for_block( &self, blockhash: &BlockHash, timeout: u64 ) -> Result<BlockRef, Error>

Waits for a specific new block and returns useful info about it. Returns the current block on timeout or exit. Read more
§

fn wallet_create_funded_psbt( &self, inputs: &[CreateRawTransactionInput], outputs: &HashMap<String, Amount, RandomState>, locktime: Option<i64>, options: Option<WalletCreateFundedPsbtOptions>, bip32derivs: Option<bool> ) -> Result<WalletCreateFundedPsbtResult, Error>

§

fn wallet_process_psbt( &self, psbt: &str, sign: Option<bool>, sighash_type: Option<SigHashType>, bip32derivs: Option<bool> ) -> Result<WalletProcessPsbtResult, Error>

§

fn get_descriptor_info( &self, desc: &str ) -> Result<GetDescriptorInfoResult, Error>

§

fn join_psbt(&self, psbts: &[String]) -> Result<String, Error>

§

fn combine_psbt(&self, psbts: &[String]) -> Result<String, Error>

§

fn combine_raw_transaction( &self, hex_strings: &[String] ) -> Result<String, Error>

§

fn finalize_psbt( &self, psbt: &str, extract: Option<bool> ) -> Result<FinalizePsbtResult, Error>

§

fn derive_addresses( &self, descriptor: &str, range: Option<[u32; 2]> ) -> Result<Vec<Address<NetworkUnchecked>, Global>, Error>

§

fn rescan_blockchain( &self, start_from: Option<usize>, stop_height: Option<usize> ) -> Result<(usize, Option<usize>), Error>

§

fn get_tx_out_set_info( &self, hash_type: Option<TxOutSetHashType>, hash_or_height: Option<HashOrHeight>, use_index: Option<bool> ) -> Result<GetTxOutSetInfoResult, Error>

Returns statistics about the unspent transaction output set. Note this call may take some time if you are not using coinstatsindex.
§

fn get_net_totals(&self) -> Result<GetNetTotalsResult, Error>

Returns information about network traffic, including bytes in, bytes out, and current time.
§

fn get_network_hash_ps( &self, nblocks: Option<u64>, height: Option<u64> ) -> Result<f64, Error>

Returns the estimated network hashes per second based on the last n blocks.
§

fn uptime(&self) -> Result<u64, Error>

Returns the total uptime of the server in seconds
§

fn submit_block(&self, block: &Block) -> Result<(), Error>

Submit a block
§

fn submit_block_bytes(&self, block_bytes: &[u8]) -> Result<(), Error>

Submit a raw block
§

fn submit_block_hex(&self, block_hex: &str) -> Result<(), Error>

Submit a block as a hex string
§

fn scan_tx_out_set_blocking( &self, descriptors: &[ScanTxOutRequest] ) -> Result<ScanTxOutResult, Error>

Auto Trait Implementations§

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

§

impl<T> Pipe for Twhere T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere R: 'a,

Borrows 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,

Mutably borrows 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,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

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,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>(&'a mut self, func: impl FnOnce(&'a mut T) -> R) -> Rwhere Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,

Immutable access to the 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,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,

Immutable access to the 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,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .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,

Calls .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,

Calls .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,

Calls .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,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,

§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<T> JsonSchemaMaybe for T

§

impl<T> MaybeDebug for Twhere T: Debug,