Enum CastSubcommand

Source
pub enum CastSubcommand {
Show 99 variants MaxInt { type: String, }, MinInt { type: String, }, MaxUint { type: String, }, AddressZero, HashZero, FromUtf8 { text: Option<String>, }, ConcatHex { data: Vec<String>, }, FromBin, ToHexdata { input: Option<String>, }, ToCheckSumAddress { address: Option<Address>, }, ToAscii { hexdata: Option<String>, }, ToUtf8 { hexdata: Option<String>, }, FromFixedPoint { decimals: Option<String>, value: Option<String>, }, ToBytes32 { bytes: Option<String>, }, ToFixedPoint { decimals: Option<String>, value: Option<String>, }, ToUint256 { value: Option<String>, }, ToInt256 { value: Option<String>, }, LeftShift { value: String, bits: String, base_in: Option<String>, base_out: String, }, RightShift { value: String, bits: String, base_in: Option<String>, base_out: String, }, ToUnit { value: Option<String>, unit: String, }, ParseUnits { value: Option<String>, unit: u8, }, FormatUnits { value: Option<String>, unit: u8, }, ToWei { value: Option<String>, unit: String, }, FromWei { value: Option<String>, unit: String, }, ToRlp { value: Option<String>, }, FromRlp { value: Option<String>, as_int: bool, }, ToHex(ToBaseArgs), ToDec(ToBaseArgs), ToBase { base: ToBaseArgs, base_out: Option<String>, }, AccessList(AccessListArgs), Logs(LogsArgs), Block { block: Option<BlockId>, field: Option<String>, full: bool, rpc: RpcOpts, }, BlockNumber { block: Option<BlockId>, rpc: RpcOpts, }, Call(CallArgs), CalldataEncode { sig: String, args: Vec<String>, }, Chain { rpc: RpcOpts, }, ChainId { rpc: RpcOpts, }, Client { rpc: RpcOpts, }, ComputeAddress { address: Option<Address>, nonce: Option<u64>, rpc: RpcOpts, }, Disassemble { bytecode: Option<String>, }, MakeTx(MakeTxArgs), Namehash { name: Option<String>, }, Tx { tx_hash: String, field: Option<String>, raw: bool, rpc: RpcOpts, }, Receipt { tx_hash: String, field: Option<String>, confirmations: u64, cast_async: bool, rpc: RpcOpts, }, SendTx(SendTxArgs), PublishTx { raw_tx: String, cast_async: bool, rpc: RpcOpts, }, Estimate(EstimateArgs), DecodeCalldata { sig: String, calldata: String, }, DecodeString { data: String, }, DecodeEvent { sig: Option<String>, data: String, }, DecodeError { sig: Option<String>, data: String, }, DecodeAbi { sig: String, calldata: String, input: bool, }, AbiEncode { sig: String, packed: bool, args: Vec<String>, }, Index { key_type: String, key: String, slot_number: String, }, IndexErc7201 { id: Option<String>, formula_id: String, }, Implementation { block: Option<BlockId>, beacon: bool, who: NameOrAddress, rpc: RpcOpts, }, Admin { block: Option<BlockId>, who: NameOrAddress, rpc: RpcOpts, }, FourByte { selector: Option<String>, }, FourByteCalldata { calldata: Option<String>, }, FourByteEvent { topic: Option<String>, }, UploadSignature { signatures: Vec<String>, }, PrettyCalldata { calldata: Option<String>, offline: bool, }, Age { block: Option<BlockId>, rpc: RpcOpts, }, Balance { block: Option<BlockId>, who: NameOrAddress, ether: bool, rpc: RpcOpts, erc20: Option<Address>, }, BaseFee { block: Option<BlockId>, rpc: RpcOpts, }, Code { block: Option<BlockId>, who: NameOrAddress, disassemble: bool, rpc: RpcOpts, }, Codesize { block: Option<BlockId>, who: NameOrAddress, rpc: RpcOpts, }, GasPrice { rpc: RpcOpts, }, SigEvent { event_string: Option<String>, }, Keccak { data: Option<String>, }, HashMessage { message: Option<String>, }, ResolveName { who: Option<String>, verify: bool, rpc: RpcOpts, }, LookupAddress { who: Option<Address>, verify: bool, rpc: RpcOpts, }, Storage(StorageArgs), Proof { address: NameOrAddress, slots: Vec<B256>, block: Option<BlockId>, rpc: RpcOpts, }, Nonce { block: Option<BlockId>, who: NameOrAddress, rpc: RpcOpts, }, Codehash { block: Option<BlockId>, who: NameOrAddress, slots: Vec<B256>, rpc: RpcOpts, }, StorageRoot { block: Option<BlockId>, who: NameOrAddress, slots: Vec<B256>, rpc: RpcOpts, }, Source { address: String, flatten: bool, directory: Option<PathBuf>, etherscan: EtherscanOpts, explorer_api_url: Option<String>, explorer_url: Option<String>, }, Wallet { command: WalletSubcommands, }, CreationCode(CreationCodeArgs), Artifact(ArtifactArgs), ConstructorArgs(ConstructorArgsArgs), Interface(InterfaceArgs), Bind(BindArgs), Sig { sig: Option<String>, optimize: Option<usize>, }, Create2(Create2Args), FindBlock(FindBlockArgs), Completions { shell: Shell, }, GenerateFigSpec, Run(RunArgs), Rpc(RpcArgs), FormatBytes32String { string: Option<String>, }, ParseBytes32String { bytes: Option<String>, }, ParseBytes32Address { bytes: Option<String>, }, DecodeTransaction { tx: Option<String>, }, Selectors { bytecode: Option<String>, resolve: bool, }, DecodeEof { eof: Option<String>, }, TxPool { command: TxPoolSubcommands, },
}

Variants§

§

MaxInt

Prints the maximum value of the given integer type.

Fields

§type: String

The integer type to get the maximum value of.

§

MinInt

Prints the minimum value of the given integer type.

Fields

§type: String

The integer type to get the minimum value of.

§

MaxUint

Prints the maximum value of the given integer type.

Fields

§type: String

The unsigned integer type to get the maximum value of.

§

AddressZero

Prints the zero address.

§

HashZero

Prints the zero hash.

§

FromUtf8

Convert UTF8 text to hex.

Fields

§text: Option<String>

The text to convert.

§

ConcatHex

Concatenate hex strings.

Fields

§data: Vec<String>

The data to concatenate.

§

FromBin

Convert binary data into hex data.

§

ToHexdata

Normalize the input to lowercase, 0x-prefixed hex.

The input can be:

  • mixed case hex with or without 0x prefix
  • 0x prefixed hex, concatenated with a ‘:’
  • an absolute path to file
  • @tag, where the tag is defined in an environment variable

Fields

§input: Option<String>

The input to normalize.

§

ToCheckSumAddress

Convert an address to a checksummed format (EIP-55).

Fields

§address: Option<Address>

The address to convert.

§

ToAscii

Convert hex data to an ASCII string.

Fields

§hexdata: Option<String>

The hex data to convert.

§

ToUtf8

Convert hex data to a utf-8 string.

Fields

§hexdata: Option<String>

The hex data to convert.

§

FromFixedPoint

Convert a fixed point number into an integer.

Fields

§decimals: Option<String>

The number of decimals to use.

§value: Option<String>

The value to convert.

§

ToBytes32

Right-pads hex data to 32 bytes.

Fields

§bytes: Option<String>

The hex data to convert.

§

ToFixedPoint

Convert an integer into a fixed point number.

Fields

§decimals: Option<String>

The number of decimals to use.

§value: Option<String>

The value to convert.

§

ToUint256

Convert a number to a hex-encoded uint256.

Fields

§value: Option<String>

The value to convert.

§

ToInt256

Convert a number to a hex-encoded int256.

Fields

§value: Option<String>

The value to convert.

§

LeftShift

Perform a left shifting operation

Fields

§value: String

The value to shift.

§bits: String

The number of bits to shift.

§base_in: Option<String>

The input base.

§base_out: String

The output base.

§

RightShift

Perform a right shifting operation

Fields

§value: String

The value to shift.

§bits: String

The number of bits to shift.

§base_in: Option<String>

The input base,

§base_out: String

The output base,

§

ToUnit

Convert an ETH amount into another unit (ether, gwei or wei).

Examples:

  • 1ether wei
  • “1 ether” wei
  • 1ether
  • 1 gwei
  • 1gwei ether

Fields

§value: Option<String>

The value to convert.

§unit: String

The unit to convert to (ether, gwei, wei).

§

ParseUnits

Convert a number from decimal to smallest unit with arbitrary decimals.

Examples:

  • 1.0 6 (for USDC, result: 1000000)
  • 2.5 12 (for 12 decimals token, result: 2500000000000)
  • 1.23 3 (for 3 decimals token, result: 1230)

Fields

§value: Option<String>

The value to convert.

§unit: u8

The unit to convert to.

§

FormatUnits

Format a number from smallest unit to decimal with arbitrary decimals.

Examples:

  • 1000000 6 (for USDC, result: 1.0)
  • 2500000000000 12 (for 12 decimals, result: 2.5)
  • 1230 3 (for 3 decimals, result: 1.23)

Fields

§value: Option<String>

The value to format.

§unit: u8

The unit to format to.

§

ToWei

Convert an ETH amount to wei.

Consider using –to-unit.

Fields

§value: Option<String>

The value to convert.

§unit: String

The unit to convert from (ether, gwei, wei).

§

FromWei

Convert wei into an ETH amount.

Consider using –to-unit.

Fields

§value: Option<String>

The value to convert.

§unit: String

The unit to convert from (ether, gwei, wei).

§

ToRlp

RLP encodes hex data, or an array of hex data.

Accepts a hex-encoded string, or an array of hex-encoded strings. Can be arbitrarily recursive.

Examples:

  • cast to-rlp "[]" -> 0xc0
  • cast to-rlp "0x22" -> 0x22
  • cast to-rlp "[\"0x61\"]" -> 0xc161
  • cast to-rlp "[\"0xf1\", \"f2\"]" -> 0xc481f181f2

Fields

§value: Option<String>

The value to convert.

This is a hex-encoded string, or an array of hex-encoded strings. Can be arbitrarily recursive.

§

FromRlp

Decodes RLP hex-encoded data.

Fields

§value: Option<String>

The RLP hex-encoded data.

§as_int: bool

Decode the RLP data as int

§

ToHex(ToBaseArgs)

Converts a number of one base to another

§

ToDec(ToBaseArgs)

Converts a number of one base to decimal

§

ToBase

Converts a number of one base to another

Fields

§base_out: Option<String>

The output base.

§

AccessList(AccessListArgs)

Create an access list for a transaction.

§

Logs(LogsArgs)

Get logs by signature or topic.

§

Block

Get information about a block.

Fields

§block: Option<BlockId>

The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

§field: Option<String>

If specified, only get the given field of the block.

§full: bool
§

BlockNumber

Get the latest block number.

Fields

§block: Option<BlockId>

The hash or tag to query. If not specified, the latest number is returned.

§

Call(CallArgs)

Perform a call on an account without publishing a transaction.

§

CalldataEncode

ABI-encode a function with arguments.

Fields

§sig: String

The function signature in the format <name>(<in-types>)(<out-types>)

§args: Vec<String>

The arguments to encode.

§

Chain

Get the symbolic name of the current chain.

Fields

§

ChainId

Get the Ethereum chain ID.

Fields

§

Client

Get the current client version.

Fields

§

ComputeAddress

Compute the contract address from a given nonce and deployer address.

Fields

§address: Option<Address>

The deployer address.

§nonce: Option<u64>

The nonce of the deployer address.

§

Disassemble

Disassembles a hex-encoded bytecode into a human-readable representation.

Fields

§bytecode: Option<String>

The hex-encoded bytecode.

§

MakeTx(MakeTxArgs)

Build and sign a transaction.

§

Namehash

Calculate the ENS namehash of a name.

Fields

§

Tx

Get information about a transaction.

Fields

§tx_hash: String

The transaction hash.

§field: Option<String>

If specified, only get the given field of the transaction. If “raw”, the RLP encoded transaction will be printed.

§raw: bool

Print the raw RLP encoded transaction.

§

Receipt

Get the transaction receipt for a transaction.

Fields

§tx_hash: String

The transaction hash.

§field: Option<String>

If specified, only get the given field of the transaction.

§confirmations: u64

The number of confirmations until the receipt is fetched

§cast_async: bool

Exit immediately if the transaction was not found.

§

SendTx(SendTxArgs)

Sign and publish a transaction.

§

PublishTx

Publish a raw transaction to the network.

Fields

§raw_tx: String

The raw transaction

§cast_async: bool

Only print the transaction hash and exit immediately.

§

Estimate(EstimateArgs)

Estimate the gas cost of a transaction.

§

DecodeCalldata

Decode ABI-encoded input data.

Similar to abi-decode --input, but function selector MUST be prefixed in calldata string

Fields

§sig: String

The function signature in the format <name>(<in-types>)(<out-types>).

§calldata: String

The ABI-encoded calldata.

§

DecodeString

Decode ABI-encoded string.

Similar to calldata-decode --input, but the function argument is a string

Fields

§data: String

The ABI-encoded string.

§

DecodeEvent

Decode event data.

Fields

§sig: Option<String>

The event signature. If none provided then tries to decode from local cache or https://api.openchain.xyz.

§data: String

The event data to decode.

§

DecodeError

Decode custom error data.

Fields

§sig: Option<String>

The error signature. If none provided then tries to decode from local cache or https://api.openchain.xyz.

§data: String

The error data to decode.

§

DecodeAbi

Decode ABI-encoded input or output data.

Defaults to decoding output data. To decode input data pass –input.

When passing --input, function selector must NOT be prefixed in calldata string

Fields

§sig: String

The function signature in the format <name>(<in-types>)(<out-types>).

§calldata: String

The ABI-encoded calldata.

§input: bool

Whether to decode the input or output data.

§

AbiEncode

ABI encode the given function argument, excluding the selector.

Fields

§sig: String

The function signature.

§packed: bool

Whether to use packed encoding.

§args: Vec<String>

The arguments of the function.

§

Index

Compute the storage slot for an entry in a mapping.

Fields

§key_type: String

The mapping key type.

§key: String

The mapping key.

§slot_number: String

The storage slot of the mapping.

§

IndexErc7201

Compute storage slots as specified by ERC-7201: Namespaced Storage Layout.

Fields

§id: Option<String>

The arbitrary identifier.

§formula_id: String

The formula ID. Currently the only supported formula is erc7201.

§

Implementation

Fetch the EIP-1967 implementation for a contract Can read from the implementation slot or the beacon slot.

Fields

§block: Option<BlockId>

The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

§beacon: bool

Fetch the implementation from the beacon slot.

If not specified, the implementation slot is used.

§who: NameOrAddress

The address for which the implementation will be fetched.

§

Admin

Fetch the EIP-1967 admin account

Fields

§block: Option<BlockId>

The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

§who: NameOrAddress

The address from which the admin account will be fetched.

§

FourByte

Get the function signatures for the given selector from https://openchain.xyz.

Fields

§selector: Option<String>

The function selector.

§

FourByteCalldata

Decode ABI-encoded calldata using https://openchain.xyz.

Fields

§calldata: Option<String>

The ABI-encoded calldata.

§

FourByteEvent

Get the event signature for a given topic 0 from https://openchain.xyz.

Fields

§topic: Option<String>

Topic 0

§

UploadSignature

Upload the given signatures to https://openchain.xyz.

Example inputs:

  • “transfer(address,uint256)”
  • “function transfer(address,uint256)”
  • “function transfer(address,uint256)” “event Transfer(address,address,uint256)”
  • “./out/Contract.sol/Contract.json”

Fields

§signatures: Vec<String>

The signatures to upload.

Prefix with ‘function’, ‘event’, or ‘error’. Defaults to function if no prefix given. Can also take paths to contract artifact JSON.

§

PrettyCalldata

Pretty print calldata.

Tries to decode the calldata using https://openchain.xyz unless –offline is passed.

Fields

§calldata: Option<String>

The calldata.

§offline: bool

Skip the https://openchain.xyz lookup.

§

Age

Get the timestamp of a block.

Fields

§block: Option<BlockId>

The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

§

Balance

Get the balance of an account in wei.

Fields

§block: Option<BlockId>

The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

§who: NameOrAddress

The account to query.

§ether: bool

Format the balance in ether.

§erc20: Option<Address>

erc20 address to query, with the method balanceOf(address) return (uint256), alias with ‘–erc721’

§

BaseFee

Get the basefee of a block.

Fields

§block: Option<BlockId>

The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

§

Code

Get the runtime bytecode of a contract.

Fields

§block: Option<BlockId>

The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

§who: NameOrAddress

The contract address.

§disassemble: bool

Disassemble bytecodes.

§

Codesize

Get the runtime bytecode size of a contract.

Fields

§block: Option<BlockId>

The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

§who: NameOrAddress

The contract address.

§

GasPrice

Get the current gas price.

Fields

§

SigEvent

Generate event signatures from event string.

Fields

§event_string: Option<String>

The event string.

§

Keccak

Hash arbitrary data using Keccak-256.

Fields

§data: Option<String>

The data to hash.

§

HashMessage

Hash a message according to EIP-191.

Fields

§message: Option<String>

The message to hash.

§

ResolveName

Perform an ENS lookup.

Fields

§who: Option<String>

The name to lookup.

§verify: bool

Perform a reverse lookup to verify that the name is correct.

§

LookupAddress

Perform an ENS reverse lookup.

Fields

§who: Option<Address>

The account to perform the lookup for.

§verify: bool

Perform a normal lookup to verify that the address is correct.

§

Storage(StorageArgs)

Get the raw value of a contract’s storage slot.

§

Proof

Generate a storage proof for a given storage slot.

Fields

§address: NameOrAddress

The contract address.

§slots: Vec<B256>

The storage slot numbers (hex or decimal).

§block: Option<BlockId>

The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

§

Nonce

Get the nonce for an account.

Fields

§block: Option<BlockId>

The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

§who: NameOrAddress

The address to get the nonce for.

§

Codehash

Get the codehash for an account.

Fields

§block: Option<BlockId>

The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

§who: NameOrAddress

The address to get the codehash for.

§slots: Vec<B256>

The storage slot numbers (hex or decimal).

§

StorageRoot

Get the storage root for an account.

Fields

§block: Option<BlockId>

The block height to query at.

Can also be the tags earliest, finalized, safe, latest, or pending.

§who: NameOrAddress

The address to get the storage root for.

§slots: Vec<B256>

The storage slot numbers (hex or decimal).

§

Source

Get the source code of a contract from a block explorer.

Fields

§address: String

The contract’s address.

§flatten: bool

Whether to flatten the source code.

§directory: Option<PathBuf>

The output directory/file to expand source tree into.

§etherscan: EtherscanOpts
§explorer_api_url: Option<String>

Alternative explorer API URL to use that adheres to the Etherscan API. If not provided, defaults to Etherscan.

§explorer_url: Option<String>

Alternative explorer browser URL.

§

Wallet

Wallet management utilities.

Fields

§

CreationCode(CreationCodeArgs)

Download a contract creation code from Etherscan and RPC.

§

Artifact(ArtifactArgs)

Generate an artifact file, that can be used to deploy a contract locally.

§

ConstructorArgs(ConstructorArgsArgs)

Display constructor arguments used for the contract initialization.

§

Interface(InterfaceArgs)

Generate a Solidity interface from a given ABI.

Currently does not support ABI encoder v2.

§

Bind(BindArgs)

Generate a rust binding from a given ABI.

§

Sig

Get the selector for a function.

Fields

§sig: Option<String>

The function signature, e.g. transfer(address,uint256).

§optimize: Option<usize>

Optimize signature to contain provided amount of leading zeroes in selector.

§

Create2(Create2Args)

Generate a deterministic contract address using CREATE2.

§

FindBlock(FindBlockArgs)

Get the block number closest to the provided timestamp.

§

Completions

Generate shell completions script.

Fields

§shell: Shell
§

GenerateFigSpec

Generate Fig autocompletion spec.

§

Run(RunArgs)

Runs a published transaction in a local environment and prints the trace.

§

Rpc(RpcArgs)

Perform a raw JSON-RPC request.

§

FormatBytes32String

Formats a string into bytes32 encoding.

Fields

§string: Option<String>

The string to format.

§

ParseBytes32String

Parses a string from bytes32 encoding.

Fields

§bytes: Option<String>

The string to parse.

§

ParseBytes32Address

Fields

§

DecodeTransaction

Decodes a raw signed EIP 2718 typed transaction

Fields

§

Selectors

Extracts function selectors and arguments from bytecode

Fields

§bytecode: Option<String>

The hex-encoded bytecode.

§resolve: bool

Resolve the function signatures for the extracted selectors using https://openchain.xyz

§

DecodeEof

Decodes EOF container bytes

Fields

§

TxPool

Inspect the TxPool of a node.

Fields

Trait Implementations§

Source§

impl FromArgMatches for CastSubcommand

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for CastSubcommand

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate self via [FromArgMatches::update_from_arg_matches_mut] Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

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, R> CollectAndApply<T, R> for T

§

fn collect_and_apply<I, F>(iter: I, f: F) -> R
where I: Iterator<Item = T>, F: FnOnce(&[T]) -> R,

Equivalent to f(&iter.collect::<Vec<_>>()).

§

type Output = R

§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where 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

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<D> OwoColorize for D

§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
§

fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>

Change the foreground color to black
§

fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>

Change the background color to black
§

fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>

Change the foreground color to red
§

fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>

Change the background color to red
§

fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>

Change the foreground color to green
§

fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>

Change the background color to green
§

fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>

Change the foreground color to yellow
§

fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>

Change the background color to yellow
§

fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>

Change the foreground color to blue
§

fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>

Change the background color to blue
§

fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>

Change the foreground color to magenta
§

fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>

Change the background color to magenta
§

fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>

Change the foreground color to purple
§

fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>

Change the background color to purple
§

fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>

Change the foreground color to cyan
§

fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>

Change the background color to cyan
§

fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>

Change the foreground color to white
§

fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>

Change the background color to white
§

fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>

Change the foreground color to the terminal default
§

fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>

Change the background color to the terminal default
§

fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>

Change the foreground color to bright black
§

fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>

Change the background color to bright black
§

fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>

Change the foreground color to bright red
§

fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>

Change the background color to bright red
§

fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>

Change the foreground color to bright green
§

fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>

Change the background color to bright green
§

fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>

Change the foreground color to bright yellow
§

fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>

Change the background color to bright yellow
§

fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>

Change the foreground color to bright blue
§

fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>

Change the background color to bright blue
§

fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>

Change the foreground color to bright magenta
§

fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>

Change the background color to bright magenta
§

fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>

Change the foreground color to bright purple
§

fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>

Change the background color to bright purple
§

fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>

Change the foreground color to bright cyan
§

fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>

Change the background color to bright cyan
§

fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>

Change the foreground color to bright white
§

fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>

Change the background color to bright white
§

fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>

Make the text bold
§

fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>

Make the text dim
§

fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>

Make the text italicized
§

fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>

Make the text italicized
Make the text blink
Make the text blink (but fast!)
§

fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>

Swap the foreground and background colors
§

fn hidden<'a>(&'a self) -> HiddenDisplay<'a, Self>

Hide the text
§

fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>

Cross out the text
§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
§

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

§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling [Attribute] value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi [Quirk] value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the [Condition] value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new [Painted] with a default [Style]. Read more
§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
§

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

Source§

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

Source§

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

Source§

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

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
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> MaybeSendSync for T

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 1048 bytes

Size for each variant:

  • MaxInt: 32 bytes
  • MinInt: 32 bytes
  • MaxUint: 32 bytes
  • AddressZero: 0 bytes
  • HashZero: 0 bytes
  • FromUtf8: 32 bytes
  • ConcatHex: 32 bytes
  • FromBin: 0 bytes
  • ToHexdata: 32 bytes
  • ToCheckSumAddress: 29 bytes
  • ToAscii: 32 bytes
  • ToUtf8: 32 bytes
  • FromFixedPoint: 56 bytes
  • ToBytes32: 32 bytes
  • ToFixedPoint: 56 bytes
  • ToUint256: 32 bytes
  • ToInt256: 32 bytes
  • LeftShift: 104 bytes
  • RightShift: 104 bytes
  • ToUnit: 56 bytes
  • ParseUnits: 40 bytes
  • FormatUnits: 40 bytes
  • ToWei: 56 bytes
  • FromWei: 56 bytes
  • ToRlp: 32 bytes
  • FromRlp: 40 bytes
  • ToHex: 56 bytes
  • ToDec: 56 bytes
  • ToBase: 80 bytes
  • AccessList: 888 bytes
  • Logs: 544 bytes
  • Block: 176 bytes
  • BlockNumber: 144 bytes
  • Call: 1048 bytes
  • CalldataEncode: 56 bytes
  • Chain: 104 bytes
  • ChainId: 104 bytes
  • Client: 104 bytes
  • ComputeAddress: 144 bytes
  • Disassemble: 32 bytes
  • MakeTx: 952 bytes
  • Namehash: 32 bytes
  • Tx: 160 bytes
  • Receipt: 168 bytes
  • SendTx: 976 bytes
  • PublishTx: 136 bytes
  • Estimate: 1000 bytes
  • DecodeCalldata: 56 bytes
  • DecodeString: 32 bytes
  • DecodeEvent: 56 bytes
  • DecodeError: 56 bytes
  • DecodeAbi: 64 bytes
  • AbiEncode: 64 bytes
  • Index: 80 bytes
  • IndexErc7201: 56 bytes
  • Implementation: 184 bytes
  • Admin: 176 bytes
  • FourByte: 32 bytes
  • FourByteCalldata: 32 bytes
  • FourByteEvent: 32 bytes
  • UploadSignature: 32 bytes
  • PrettyCalldata: 40 bytes
  • Age: 144 bytes
  • Balance: 200 bytes
  • BaseFee: 144 bytes
  • Code: 184 bytes
  • Codesize: 176 bytes
  • GasPrice: 104 bytes
  • SigEvent: 32 bytes
  • Keccak: 32 bytes
  • HashMessage: 32 bytes
  • ResolveName: 136 bytes
  • LookupAddress: 128 bytes
  • Storage: 696 bytes
  • Proof: 200 bytes
  • Nonce: 176 bytes
  • Codehash: 200 bytes
  • StorageRoot: 200 bytes
  • Source: 152 bytes
  • Wallet: 392 bytes
  • CreationCode: 192 bytes
  • Artifact: 216 bytes
  • ConstructorArgs: 192 bytes
  • Interface: 144 bytes
  • Bind: 152 bytes
  • Sig: 48 bytes
  • Create2: 248 bytes
  • FindBlock: 112 bytes
  • Completions: 9 bytes
  • GenerateFigSpec: 0 bytes
  • Run: 224 bytes
  • Rpc: 160 bytes
  • FormatBytes32String: 32 bytes
  • ParseBytes32String: 32 bytes
  • ParseBytes32Address: 32 bytes
  • DecodeTransaction: 32 bytes
  • Selectors: 40 bytes
  • DecodeEof: 32 bytes
  • TxPool: 128 bytes