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.
MinInt
Prints the minimum value of the given integer type.
MaxUint
Prints the maximum value of the given integer type.
AddressZero
Prints the zero address.
HashZero
Prints the zero hash.
FromUtf8
Convert UTF8 text to hex.
ConcatHex
Concatenate hex strings.
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
ToCheckSumAddress
Convert an address to a checksummed format (EIP-55).
ToAscii
Convert hex data to an ASCII string.
ToUtf8
Convert hex data to a utf-8 string.
FromFixedPoint
Convert a fixed point number into an integer.
Fields
ToBytes32
Right-pads hex data to 32 bytes.
ToFixedPoint
Convert an integer into a fixed point number.
Fields
ToUint256
Convert a number to a hex-encoded uint256.
ToInt256
Convert a number to a hex-encoded int256.
LeftShift
Perform a left shifting operation
Fields
RightShift
Perform a right shifting operation
Fields
ToUnit
Convert an ETH amount into another unit (ether, gwei or wei).
Examples:
- 1ether wei
- “1 ether” wei
- 1ether
- 1 gwei
- 1gwei ether
Fields
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)
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)
ToWei
Convert an ETH amount to wei.
Consider using –to-unit.
Fields
FromWei
Convert wei into an ETH amount.
Consider using –to-unit.
Fields
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
FromRlp
Decodes RLP hex-encoded data.
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
AccessList(AccessListArgs)
Create an access list for a transaction.
Logs(LogsArgs)
Get logs by signature or topic.
Block
Get information about a block.
Fields
BlockNumber
Get the latest block number.
Fields
Call(CallArgs)
Perform a call on an account without publishing a transaction.
CalldataEncode
ABI-encode a function with arguments.
Fields
Chain
Get the symbolic name of the current chain.
ChainId
Get the Ethereum chain ID.
Client
Get the current client version.
ComputeAddress
Compute the contract address from a given nonce and deployer address.
Fields
Disassemble
Disassembles a hex-encoded bytecode into a human-readable representation.
MakeTx(MakeTxArgs)
Build and sign a transaction.
Namehash
Calculate the ENS namehash of a name.
Tx
Get information about a transaction.
Fields
Receipt
Get the transaction receipt for a transaction.
Fields
SendTx(SendTxArgs)
Sign and publish a transaction.
PublishTx
Publish a raw transaction to the network.
Fields
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
DecodeString
Decode ABI-encoded string.
Similar to calldata-decode --input
, but the function argument is a 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.
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.
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
AbiEncode
ABI encode the given function argument, excluding the selector.
Fields
Index
Compute the storage slot for an entry in a mapping.
Fields
IndexErc7201
Compute storage slots as specified by ERC-7201: Namespaced Storage Layout
.
Fields
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.
FourByteCalldata
Decode ABI-encoded calldata using https://openchain.xyz.
FourByteEvent
Get the event signature for a given topic 0 from https://openchain.xyz.
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
PrettyCalldata
Pretty print calldata.
Tries to decode the calldata using https://openchain.xyz unless –offline is passed.
Age
Get the timestamp of a block.
Fields
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.
BaseFee
Get the basefee of a block.
Fields
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.
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.
SigEvent
Generate event signatures from event string.
Keccak
Hash arbitrary data using Keccak-256.
HashMessage
Hash a message according to EIP-191.
ResolveName
Perform an ENS lookup.
Fields
LookupAddress
Perform an ENS reverse lookup.
Fields
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.
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.
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.
Source
Get the source code of a contract from a block explorer.
Fields
etherscan: EtherscanOpts
Wallet
Wallet management utilities.
Fields
command: WalletSubcommands
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
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.
ParseBytes32String
Parses a string from bytes32 encoding.
ParseBytes32Address
DecodeTransaction
Decodes a raw signed EIP 2718 typed transaction
Selectors
Extracts function selectors and arguments from bytecode
Fields
resolve: bool
Resolve the function signatures for the extracted selectors using https://openchain.xyz
DecodeEof
Decodes EOF container bytes
TxPool
Inspect the TxPool of a node.
Fields
command: TxPoolSubcommands
Trait Implementations§
Source§impl FromArgMatches for CastSubcommand
impl FromArgMatches for CastSubcommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§impl Subcommand for CastSubcommand
impl Subcommand for CastSubcommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command
] so it can instantiate self
via
[FromArgMatches::update_from_arg_matches_mut
] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self
can parse a specific subcommandAuto Trait Implementations§
impl Freeze for CastSubcommand
impl RefUnwindSafe for CastSubcommand
impl Send for CastSubcommand
impl Sync for CastSubcommand
impl Unpin for CastSubcommand
impl UnwindSafe for CastSubcommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
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,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
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>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
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 bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
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>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
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 rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
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 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.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
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);
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
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
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
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
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.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
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.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
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
impl<T> ErasedDestructor for Twhere
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 bytesMinInt
: 32 bytesMaxUint
: 32 bytesAddressZero
: 0 bytesHashZero
: 0 bytesFromUtf8
: 32 bytesConcatHex
: 32 bytesFromBin
: 0 bytesToHexdata
: 32 bytesToCheckSumAddress
: 29 bytesToAscii
: 32 bytesToUtf8
: 32 bytesFromFixedPoint
: 56 bytesToBytes32
: 32 bytesToFixedPoint
: 56 bytesToUint256
: 32 bytesToInt256
: 32 bytesLeftShift
: 104 bytesRightShift
: 104 bytesToUnit
: 56 bytesParseUnits
: 40 bytesFormatUnits
: 40 bytesToWei
: 56 bytesFromWei
: 56 bytesToRlp
: 32 bytesFromRlp
: 40 bytesToHex
: 56 bytesToDec
: 56 bytesToBase
: 80 bytesAccessList
: 888 bytesLogs
: 544 bytesBlock
: 176 bytesBlockNumber
: 144 bytesCall
: 1048 bytesCalldataEncode
: 56 bytesChain
: 104 bytesChainId
: 104 bytesClient
: 104 bytesComputeAddress
: 144 bytesDisassemble
: 32 bytesMakeTx
: 952 bytesNamehash
: 32 bytesTx
: 160 bytesReceipt
: 168 bytesSendTx
: 976 bytesPublishTx
: 136 bytesEstimate
: 1000 bytesDecodeCalldata
: 56 bytesDecodeString
: 32 bytesDecodeEvent
: 56 bytesDecodeError
: 56 bytesDecodeAbi
: 64 bytesAbiEncode
: 64 bytesIndex
: 80 bytesIndexErc7201
: 56 bytesImplementation
: 184 bytesAdmin
: 176 bytesFourByte
: 32 bytesFourByteCalldata
: 32 bytesFourByteEvent
: 32 bytesUploadSignature
: 32 bytesPrettyCalldata
: 40 bytesAge
: 144 bytesBalance
: 200 bytesBaseFee
: 144 bytesCode
: 184 bytesCodesize
: 176 bytesGasPrice
: 104 bytesSigEvent
: 32 bytesKeccak
: 32 bytesHashMessage
: 32 bytesResolveName
: 136 bytesLookupAddress
: 128 bytesStorage
: 696 bytesProof
: 200 bytesNonce
: 176 bytesCodehash
: 200 bytesStorageRoot
: 200 bytesSource
: 152 bytesWallet
: 392 bytesCreationCode
: 192 bytesArtifact
: 216 bytesConstructorArgs
: 192 bytesInterface
: 144 bytesBind
: 152 bytesSig
: 48 bytesCreate2
: 248 bytesFindBlock
: 112 bytesCompletions
: 9 bytesGenerateFigSpec
: 0 bytesRun
: 224 bytesRpc
: 160 bytesFormatBytes32String
: 32 bytesParseBytes32String
: 32 bytesParseBytes32Address
: 32 bytesDecodeTransaction
: 32 bytesSelectors
: 40 bytesDecodeEof
: 32 bytesTxPool
: 128 bytes