Struct cfx_rpc::EthApi

source ·
pub struct EthApi { /* private fields */ }

Implementations§

source§

impl EthApi

source

pub fn new( config: RpcImplConfiguration, consensus: SharedConsensusGraph, sync: SharedSynchronizationService, tx_pool: SharedTransactionPool ) -> Self

source

pub fn consensus_graph(&self) -> &ConsensusGraph

source

pub fn tx_pool(&self) -> &SharedTransactionPool

source

pub fn fetch_block_by_height(&self, height: u64) -> Result<PhantomBlock, String>

source

pub fn fetch_block_by_hash(&self, hash: &H256) -> Result<PhantomBlock, String>

source

pub fn exec_transaction( &self, request: TransactionRequest, block_number_or_hash: Option<BlockNumber> ) -> CoreResult<(Executed, U256)>

source

pub fn send_transaction_with_signature( &self, tx: TransactionWithSignature ) -> CoreResult<H256>

source

pub fn construct_rpc_receipt( &self, b: &PhantomBlock, idx: usize, prior_log_index: &mut usize ) -> CoreResult<Receipt>

source

pub fn get_tx_from_txpool(&self, hash: H256) -> Option<Transaction>

source

pub fn get_block_receipts( &self, block_num: BlockNumber ) -> CoreResult<Vec<Receipt>>

source

pub fn block_tx_by_index( phantom_block: Option<PhantomBlock>, idx: usize ) -> Option<Transaction>

source

pub fn sync_status(&self) -> SyncStatus

source

pub fn chain_id(&self) -> u32

source

pub fn gas_price(&self) -> U256

source

pub fn latest_block_number(&self) -> CoreResult<U256>

source

pub fn best_epoch_number(&self) -> u64

source

pub fn user_balance( &self, address: H160, num: Option<BlockNumber> ) -> CoreResult<U256>

source

pub fn storage_at( &self, address: H160, position: U256, block_num: Option<BlockNumber> ) -> CoreResult<H256>

source

pub fn phantom_block_by_hash( &self, hash: H256 ) -> CoreResult<Option<PhantomBlock>>

source

pub fn phantom_block_by_number( &self, block_num: BlockNumber ) -> CoreResult<Option<PhantomBlock>>

source

pub fn block_by_hash( &self, hash: H256, include_txs: bool ) -> CoreResult<Option<Block>>

source

pub fn block_by_number( &self, block_num: BlockNumber, include_txs: bool ) -> CoreResult<Option<Block>>

source

pub fn next_nonce( &self, address: H160, num: Option<BlockNumber> ) -> CoreResult<U256>

source

pub fn block_transaction_count_by_hash( &self, hash: H256 ) -> CoreResult<Option<U256>>

source

pub fn block_transaction_count_by_number( &self, block_num: BlockNumber ) -> CoreResult<Option<U256>>

source

pub fn block_uncles_count_by_hash(&self, hash: H256) -> CoreResult<Option<U256>>

source

pub fn block_uncles_count_by_number( &self, block_num: BlockNumber ) -> CoreResult<Option<U256>>

source

pub fn code_at( &self, address: H160, epoch_num: Option<BlockNumber> ) -> CoreResult<Bytes>

source

pub fn fee_history( &self, block_count: HexU64, newest_block: BlockNumber, reward_percentiles: Option<Vec<f64>> ) -> CoreResult<FeeHistory>

source

pub fn transaction_by_hash(&self, hash: H256) -> CoreResult<Option<Transaction>>

source

pub fn transaction_receipt(&self, tx_hash: H256) -> CoreResult<Option<Receipt>>

source

pub fn logs(&self, filter: EthRpcLogFilter) -> CoreResult<Vec<Log>>

source

pub fn max_priority_fee_per_gas(&self) -> CoreResult<U256>

Trait Implementations§

source§

impl BlockProvider for &EthApi

source§

fn get_block_epoch_number(&self, hash: &H256) -> Option<u64>

source§

fn get_block_hashes_by_epoch( &self, epoch_number: EpochNumber ) -> Result<Vec<H256>, String>

source§

impl EthApiServer for EthApi

source§

fn protocol_version<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<U64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the protocol version encoded as a string.

source§

fn syncing(&self) -> RpcResult<SyncStatus>

Returns an object with data about the sync status or false.

source§

fn author<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<Address>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the client coinbase address.

source§

fn accounts(&self) -> RpcResult<Vec<Address>>

Returns a list of addresses owned by client.

source§

fn block_number(&self) -> RpcResult<U256>

Returns the number of most recent block.

source§

fn chain_id<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<Option<U64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the chain ID of the current network.

source§

fn block_by_hash<'life0, 'async_trait>( &'life0 self, hash: H256, full: bool ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns information about a block by hash.

source§

fn block_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumber, full: bool ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns information about a block by number.

source§

fn block_transaction_count_by_hash<'life0, 'async_trait>( &'life0 self, hash: H256 ) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the number of transactions in a block from a block matching the given block hash.

source§

fn block_transaction_count_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumber ) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the number of transactions in a block matching the given block number.

source§

fn block_uncles_count_by_hash<'life0, 'async_trait>( &'life0 self, hash: H256 ) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the number of uncles in a block from a block matching the given block hash.

source§

fn block_uncles_count_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumber ) -> Pin<Box<dyn Future<Output = RpcResult<Option<U256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the number of uncles in a block with given block number.

source§

fn block_receipts<'life0, 'async_trait>( &'life0 self, block_id: BlockId ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<Receipt>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns all transaction receipts for a given block.

source§

fn uncle_by_block_hash_and_index<'life0, 'async_trait>( &'life0 self, hash: H256, index: Index ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns an uncle block of the given block and index.

source§

fn uncle_by_block_number_and_index<'life0, 'async_trait>( &'life0 self, number: BlockNumber, index: Index ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Block>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns an uncle block of the given block and index.

source§

fn raw_transaction_by_hash<'life0, 'async_trait>( &'life0 self, hash: H256 ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the EIP-2718 encoded transaction if it exists.

If this is a EIP-4844 transaction that is in the pool it will include the sidecar.

source§

fn transaction_by_hash<'life0, 'async_trait>( &'life0 self, hash: H256 ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Transaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the information about a transaction requested by transaction hash.

source§

fn raw_transaction_by_block_hash_and_index<'life0, 'async_trait>( &'life0 self, hash: H256, index: Index ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns information about a raw transaction by block hash and transaction index position.

source§

fn transaction_by_block_hash_and_index<'life0, 'async_trait>( &'life0 self, hash: H256, index: Index ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Transaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns information about a transaction by block hash and transaction index position.

source§

fn raw_transaction_by_block_number_and_index<'life0, 'async_trait>( &'life0 self, number: BlockNumber, index: Index ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Bytes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns information about a raw transaction by block number and transaction index position.

source§

fn transaction_by_block_number_and_index<'life0, 'async_trait>( &'life0 self, number: BlockNumber, index: Index ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Transaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns information about a transaction by block number and transaction index position.

source§

fn transaction_by_sender_and_nonce<'life0, 'async_trait>( &'life0 self, address: Address, nonce: U64 ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Transaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns information about a transaction by sender and nonce.

source§

fn transaction_receipt<'life0, 'async_trait>( &'life0 self, hash: H256 ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Receipt>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the receipt of a transaction by transaction hash.

source§

fn balance<'life0, 'async_trait>( &'life0 self, address: Address, block_number: Option<BlockId> ) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the balance of the account of given address.

source§

fn storage_at<'life0, 'async_trait>( &'life0 self, address: Address, index: U256, block_number: Option<BlockId> ) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the value from a storage position at a given address

source§

fn transaction_count<'life0, 'async_trait>( &'life0 self, address: Address, block_number: Option<BlockId> ) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the number of transactions sent from an address at given block number.

source§

fn get_code<'life0, 'async_trait>( &'life0 self, address: Address, block_number: Option<BlockId> ) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns code at a given address at given block number.

source§

fn header_by_number<'life0, 'async_trait>( &'life0 self, hash: BlockNumber ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Header>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the block’s header at given number.

source§

fn header_by_hash<'life0, 'async_trait>( &'life0 self, hash: H256 ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Header>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the block’s header at given hash.

source§

fn call<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: Option<BlockId> ) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

eth_simulateV1 executes an arbitrary number of transactions on top of the requested state. The transactions are packed into individual blocks. Overrides can be provided. Executes a new message call immediately without creating a transaction on the block chain.

source§

fn estimate_gas<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, block_number: Option<BlockId> ) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Simulate arbitrary number of transactions at an arbitrary blockchain index, with the optionality of state overrides Generates an access list for a transaction.

This method creates an EIP2930 type accessList based on a given Transaction.

An access list contains all storage slots and addresses touched by the transaction, except for the sender account and the chain’s precompiles.

It returns list of addresses and storage keys used by the transaction, plus the gas consumed when the access list is added. That is, it gives you the list of addresses and storage keys that will be used by that transaction, plus the gas consumed if the access list is included. Like eth_estimateGas, this is an estimation; the list could change when the transaction is actually mined. Adding an accessList to your transaction does not necessary result in lower gas usage compared to a transaction without an access list. Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

source§

fn gas_price<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the current price per gas in wei.

source§

fn max_priority_fee_per_gas<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the account details by specifying an address and a block number/tag Introduced in EIP-1559, returns suggestion for the priority for dynamic fee transactions.

source§

fn fee_history<'life0, 'async_trait>( &'life0 self, block_count: U64, newest_block: BlockNumber, reward_percentiles: Option<Vec<f64>> ) -> Pin<Box<dyn Future<Output = RpcResult<FeeHistory>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Introduced in EIP-4844, returns the current blob base fee in wei. Returns the Transaction fee history

Introduced in EIP-1559 for getting information on the appropriate priority fee to use.

Returns transaction base fee per gas and effective priority fee per gas for the requested/supported block range. The returned Fee history for the returned block range can be a subsection of the requested range if not all blocks are available.

source§

fn is_mining<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns whether the client is actively mining new blocks.

source§

fn hashrate<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the number of hashes per second that the node is mining with.

source§

fn submit_hashrate<'life0, 'async_trait>( &'life0 self, hashrate: U256, id: H256 ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the hash of the current block, the seedHash, and the boundary condition to be met (“target”) Used for submitting mining hashrate.

Can be used for remote miners to submit their hash rate. It accepts the miner hash rate and an identifier which must be unique between nodes. Returns true if the block was successfully submitted, false otherwise.

source§

fn submit_work<'life0, 'async_trait>( &'life0 self, nonce: H64, pow_hash: H256, mix_digest: H256 ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Used for submitting a proof-of-work solution.

source§

fn send_transaction<'life0, 'async_trait>( &'life0 self, request: TransactionRequest ) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Sends transaction; will block waiting for signer to return the transaction hash.

source§

fn send_raw_transaction<'life0, 'async_trait>( &'life0 self, bytes: Bytes ) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Sends signed transaction, returning its hash.

source§

fn sign<'life0, 'async_trait>( &'life0 self, address: Address, message: Bytes ) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns an Ethereum specific signature with: sign(keccak256(“\x19Ethereum Signed Message:\n”

  • len(message) + message))).
source§

fn sign_transaction<'life0, 'async_trait>( &'life0 self, transaction: TransactionRequest ) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Signs a transaction that can be submitted to the network at a later time using with sendRawTransaction.

source§

fn logs<'life0, 'async_trait>( &'life0 self, filter: Filter ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns logs matching given filter object.
source§

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Auto Trait Implementations§

§

impl !RefUnwindSafe for EthApi

§

impl Send for EthApi

§

impl Sync for EthApi

§

impl Unpin for EthApi

§

impl !UnwindSafe for EthApi

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

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) -> T
where Self: Into<T>,

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

impl<T> ElementSatisfy<ElementNoConstrain> for T

§

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

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 T
where U: From<T>,

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> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where 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) -> R
where 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) -> R
where 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) -> R
where 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 ) -> R
where 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) -> R
where 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) -> R
where 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) -> R
where 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 ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

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

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same 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)) -> Self
where 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)) -> Self
where 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)) -> Self
where 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)) -> Self
where 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)) -> Self
where 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)) -> Self
where 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)) -> Self
where 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)) -> Self
where 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)) -> Self
where 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)) -> Self
where 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)) -> Self
where 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)) -> Self
where 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 T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
§

impl<V, T> VZip<V> for T
where 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> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSendSync for T

§

impl<T> UnsafeAny for T
where T: Any,