pub struct InspectorStackInner {Show 48 fields
pub analysis: Option<Analysis>,
pub chisel_state: Option<Box<ChiselState>>,
pub debug_recorder: Option<Box<DebugRecorder>>,
pub edge_coverage: Option<Box<EdgeCovInspector>>,
pub fuzzer: Option<Box<Fuzzer>>,
pub line_coverage: Option<Box<LineCoverageCollector>>,
pub log_collector: Option<Box<LogCollector>>,
pub printer: Option<Box<CustomPrintTracer>>,
pub revert_diag: Option<Box<RevertDiagnostic>>,
pub script_execution_inspector: Option<Box<ScriptExecutionInspector>>,
pub tempo_labels: Option<Box<TempoLabels>>,
pub tracer: Option<Box<TracingInspector>>,
pub sancov_edges: bool,
pub sancov_trace_cmp: bool,
pub edgecov_opcode: bool,
pub instrumented_edges: bool,
pub instrumented_cmp_log: bool,
pub enable_isolation: bool,
pub fork_prefetch: bool,
pub extra_cheatcode_addresses: &'static [Address],
pub create2_deployer: Address,
pub in_inner_context: bool,
inner_root_depth: Option<u16>,
pending_inner_root: Option<InnerRoot>,
synthetic_create_depth: Option<u16>,
isolated_source_fork: Option<(Option<U256>, Option<u64>)>,
isolated_switch_warmth: Option<(PrewarmSet, AddressMap<HashSet<U256>>)>,
env_handoff_ended: bool,
tx_created: AddressMap<HashSet<Option<U256>>>,
executed_destructs: Option<AddressMap<DestructedAccount>>,
pub reverter: Option<Address>,
pending_call_traces: Vec<PendingCallTrace>,
pending_create2_error: Option<Bytes>,
pub batch_create_counter: u64,
pub batch_rewrite_warned: bool,
pub batch_rewrite_process_salt: Option<u64>,
execution_cancellation: Option<EvmExecutionCancellation>,
cancellation_poll_counter: u8,
execution_cancelled: bool,
has_static_step_inspectors: bool,
has_static_step_end_inspectors: bool,
cheat_steps: OpcodeSet,
cheat_records_branches: bool,
static_steps: OpcodeSet,
static_end_steps: OpcodeSet,
hooked_steps: OpcodeSet,
stepped: u8,
suspended_stepped: Vec<u8>,
}Expand description
All used inspectors besides Cheatcodes.
See InspectorStack.
Fields§
§analysis: Option<Analysis>Solar compiler instance, to grant syntactic and semantic analysis capabilities.
chisel_state: Option<Box<ChiselState>>§debug_recorder: Option<Box<DebugRecorder>>§edge_coverage: Option<Box<EdgeCovInspector>>§fuzzer: Option<Box<Fuzzer>>§line_coverage: Option<Box<LineCoverageCollector>>§log_collector: Option<Box<LogCollector>>§printer: Option<Box<CustomPrintTracer>>§revert_diag: Option<Box<RevertDiagnostic>>§script_execution_inspector: Option<Box<ScriptExecutionInspector>>§tempo_labels: Option<Box<TempoLabels>>§tracer: Option<Box<TracingInspector>>§sancov_edges: boolWhether to collect sancov edge coverage from instrumented native crates.
sancov_trace_cmp: boolWhether to capture sancov trace-cmp operands for dictionary injection.
edgecov_opcode: boolWhether the EVM executes the compiler-instrumented EDGECOV and CMPLOG opcodes, which
are undefined otherwise.
instrumented_edges: boolWhether to collect EDGECOV hits as the call’s edge coverage.
instrumented_cmp_log: boolWhether to collect comparison operands from CMPLOG probes instead of the cmp-log
inspector.
enable_isolation: bool§fork_prefetch: boolWhether calls into fork contracts prefetch the remote state they are about to read, see
Backend::prefetch_call.
extra_cheatcode_addresses: &'static [Address]Additional addresses installed and recognized as cheatcode contracts.
create2_deployer: Address§in_inner_context: boolFlag marking if we are in a nested transaction duplicating a frame of the running one.
inner_root_depth: Option<u16>Depth of the frame the running nested transaction duplicates.
pending_inner_root: Option<InnerRoot>The root frame of the nested transaction about to start.
synthetic_create_depth: Option<u16>Synthetic CREATE depth corresponding to an outer top-level deployment.
isolated_source_fork: Option<(Option<U256>, Option<u64>)>Active fork and cheatcode fork epoch when the running isolated call started.
isolated_switch_warmth: Option<(PrewarmSet, AddressMap<HashSet<U256>>)>Warmth of the running isolated call when it succeeded after switching forks, even back to the one it started on, captured before its transaction ended: its whole warm set, and the accounts and slots it accessed or fork switches carried, without its transaction’s base.
env_handoff_ended: boolWhether the frame that just ended ran on a frame EVM with an in-flight environment change,
whose hooks already ran there. See InspectorStackRefMut::env_handoff.
tx_created: AddressMap<HashSet<Option<U256>>>Accounts the running top-level transaction created, directly or through isolated calls, with the forks it created them on.
executed_destructs: Option<AddressMap<DestructedAccount>>Accounts the running nested transaction, from executeTransaction or an isolated call,
self-destructed, including the ones it created. Captured when its root frame ends, before
the transaction destroys them. An isolated call that replaces the running state, such as by
switching forks, still destroys them at once.
reverter: Option<Address>Address that reverted the call, if any.
pending_call_traces: Vec<PendingCallTrace>LIFO stack tracking the effective address of traced calls delegated to the EVM provider.
pending_create2_error: Option<Bytes>Pending CREATE2 deployer validation error, returned after the create hooks of the other inspectors so the trace stays balanced.
batch_create_counter: u64Counter for CREATE2 salt in --batch CREATE rewrites.
batch_rewrite_warned: boolWhether the one-shot --batch rewrite warning has already been emitted.
batch_rewrite_process_salt: Option<u64>Per-inspector random seed mixed into --batch CREATE2 salts, ensuring re-runs
at identical on-chain state still produce distinct salts. Lazily initialized.
execution_cancellation: Option<EvmExecutionCancellation>Shared cancellation state for interruptible EVM execution.
cancellation_poll_counter: u8Counts cancellation polls; the deadline is read once every DEADLINE_POLL_INTERVAL.
execution_cancelled: boolWhether this inspector halted the current execution due to cancellation.
has_static_step_inspectors: bool§has_static_step_end_inspectors: bool§cheat_steps: OpcodeSetThe opcodes the cheatcode step hooks run at, see Cheatcodes::hook_steps. Refreshed
where evm2 reads the inspector config again, when a frame starts and when a message
returns into it, since only cheatcode calls change it.
cheat_records_branches: boolWhether the cheatcodes step JUMPI only to record it, see Cheatcodes::record_branch.
static_steps: OpcodeSetThe opcodes the other step inspectors step, see Self::static_steps. Refreshed with
Self::cheat_steps.
static_end_steps: OpcodeSetThe opcodes of Self::static_steps that an inspector with a step_end hook steps.
hooked_steps: OpcodeSetThe opcodes at which a step hook runs: every stepped opcode but the ones that only poll
the cancellation. Refreshed with Self::cheat_steps.
stepped: u8Which hooks stepped the running instruction, as STEPPED_STATIC and STEPPED_CHEAT.
suspended_stepped: Vec<u8>Self::stepped of the instruction that made each message in flight. The frames of a
message overwrite Self::stepped, and the instruction’s step_end must run the static
hooks only if its step ran them.
Implementations§
Source§impl InspectorStackInner
impl InspectorStackInner
const fn refresh_static_opcode_dispatch(&mut self)
const fn refresh_static_step_dispatch(&mut self)
const fn refresh_static_step_end_dispatch(&mut self)
Sourcefn static_steps<FEN: FoundryEvmNetwork>(&self) -> (OpcodeSet, OpcodeSet)
fn static_steps<FEN: FoundryEvmNetwork>(&self) -> (OpcodeSet, OpcodeSet)
Returns the union of the opcodes of every inspector the step hooks call besides the
cheatcodes, and the part of it that the inspectors the step_end hook calls step. An
inspector that does not declare its opcodes steps all of them.
Sourcefn next_batch_create_salt(&mut self, chain_id: u64, nonce: u64) -> U256
fn next_batch_create_salt(&mut self, chain_id: u64, nonce: u64) -> U256
Derive the next --batch CREATE2 salt and advance the per-batch counter.
The per-inspector random seed is lazily initialized on first use.
Sourcefn execute_on_frame_evm<FEN: FoundryEvmNetwork>(
&mut self,
cheatcodes: Option<&mut Cheatcodes<FEN>>,
backend: &mut dyn CheatcodesBackend<FEN>,
evm: &mut FoundryEvmFor<'_, FEN>,
env: EvmEnvFor<FEN>,
message: &mut MessageFor<FEN>,
) -> Result<MessageResultFor<FEN>, ExecutionError>
fn execute_on_frame_evm<FEN: FoundryEvmNetwork>( &mut self, cheatcodes: Option<&mut Cheatcodes<FEN>>, backend: &mut dyn CheatcodesBackend<FEN>, evm: &mut FoundryEvmFor<'_, FEN>, env: EvmEnvFor<FEN>, message: &mut MessageFor<FEN>, ) -> Result<MessageResultFor<FEN>, ExecutionError>
Executes message of the transaction evm is running on a separate frame EVM with env,
observed by the whole stack, such as for deployCode or an in-flight spec change.
Sourcefn is_inner_context_root(&self, depth: u16) -> bool
fn is_inner_context_root(&self, depth: u16) -> bool
Whether this frame is the root of a nested transaction, duplicating a surrounding frame.
Sourceconst fn enter_inner_context(
&mut self,
root: InnerRoot,
) -> (bool, Option<u16>, Option<InnerRoot>)
const fn enter_inner_context( &mut self, root: InnerRoot, ) -> (bool, Option<u16>, Option<InnerRoot>)
Enters a nested transaction whose root frame duplicates a surrounding frame, returning the
previous context to restore with Self::exit_inner_context.
Sourceconst fn exit_inner_context(
&mut self,
previous: (bool, Option<u16>, Option<InnerRoot>),
)
const fn exit_inner_context( &mut self, previous: (bool, Option<u16>, Option<InnerRoot>), )
Restores the context saved by Self::enter_inner_context.
Sourcefn replay<FEN: FoundryEvmNetwork>(
&mut self,
cheats: &mut Cheatcodes<FEN>,
backend: &mut dyn CheatcodesBackend<FEN>,
evm: &mut FoundryEvmFor<'_, FEN>,
depth: u16,
prepared: PreparedTx<TypesFor<FEN>>,
untracked: bool,
) -> Result<ExecutedNested<TypesFor<FEN>>>
fn replay<FEN: FoundryEvmNetwork>( &mut self, cheats: &mut Cheatcodes<FEN>, backend: &mut dyn CheatcodesBackend<FEN>, evm: &mut FoundryEvmFor<'_, FEN>, depth: u16, prepared: PreparedTx<TypesFor<FEN>>, untracked: bool, ) -> Result<ExecutedNested<TypesFor<FEN>>>
Executes a transaction replayed by the cheatcode call at depth, such as for
vm.transact, observed by the whole stack with cheats active over the throwaway
backend it was prepared with. Its root frame is a call below the cheatcode call.
Trait Implementations§
Source§impl<FEN: FoundryEvmNetwork> CheatcodesExecutor<FEN> for InspectorStackInner
impl<FEN: FoundryEvmNetwork> CheatcodesExecutor<FEN> for InspectorStackInner
Source§fn exec_message(
&mut self,
cheats: &mut Cheatcodes<FEN>,
backend: &mut dyn CheatcodesBackend<FEN>,
evm: &mut FoundryEvmFor<'_, FEN>,
message: &mut MessageFor<FEN>,
) -> Result<MessageResultFor<FEN>, ExecutionError>
fn exec_message( &mut self, cheats: &mut Cheatcodes<FEN>, backend: &mut dyn CheatcodesBackend<FEN>, evm: &mut FoundryEvmFor<'_, FEN>, message: &mut MessageFor<FEN>, ) -> Result<MessageResultFor<FEN>, ExecutionError>
message as a nested frame of the transaction evm is running, with cheats
active, such as for deployCode or storage-hook callbacks.Source§fn nested_transaction(
&mut self,
cheats: &mut Cheatcodes<FEN>,
backend: &mut dyn CheatcodesBackend<FEN>,
evm: &mut FoundryEvmFor<'_, FEN>,
depth: u16,
tx: &Recovered<TxFor<FEN>>,
env: Option<EvmEnvFor<FEN>>,
) -> Result<TxResultFor<FEN>>
fn nested_transaction( &mut self, cheats: &mut Cheatcodes<FEN>, backend: &mut dyn CheatcodesBackend<FEN>, evm: &mut FoundryEvmFor<'_, FEN>, depth: u16, tx: &Recovered<TxFor<FEN>>, env: Option<EvmEnvFor<FEN>>, ) -> Result<TxResultFor<FEN>>
tx as a nested transaction of the transaction evm is running, with env or
the running environment, and merges its changes so that they survive reverts of the
enclosing calls, such as for executeTransaction. A failed transaction only keeps its nonce
increment. Read moreSource§fn transact(
&mut self,
cheats: &mut Cheatcodes<FEN>,
backend: &mut dyn CheatcodesBackend<FEN>,
evm: &mut FoundryEvmFor<'_, FEN>,
depth: u16,
fork_id: Option<U256>,
transaction: B256,
) -> Result<TxResultFor<FEN>>
fn transact( &mut self, cheats: &mut Cheatcodes<FEN>, backend: &mut dyn CheatcodesBackend<FEN>, evm: &mut FoundryEvmFor<'_, FEN>, depth: u16, fork_id: Option<U256>, transaction: B256, ) -> Result<TxResultFor<FEN>>
Source§fn transact_from_tx(
&mut self,
cheats: &mut Cheatcodes<FEN>,
backend: &mut dyn CheatcodesBackend<FEN>,
evm: &mut FoundryEvmFor<'_, FEN>,
depth: u16,
tx: &Recovered<TxFor<FEN>>,
env: Option<EvmEnvFor<FEN>>,
) -> Result<TxResultFor<FEN>>
fn transact_from_tx( &mut self, cheats: &mut Cheatcodes<FEN>, backend: &mut dyn CheatcodesBackend<FEN>, evm: &mut FoundryEvmFor<'_, FEN>, depth: u16, tx: &Recovered<TxFor<FEN>>, env: Option<EvmEnvFor<FEN>>, ) -> Result<TxResultFor<FEN>>
broadcastRawTransaction. Read moreSource§fn console_log(&mut self, msg: &str)
fn console_log(&mut self, msg: &str)
console.log invocation.Source§fn tracing_inspector(&mut self) -> Option<&mut TracingInspector>
fn tracing_inspector(&mut self) -> Option<&mut TracingInspector>
Source§impl Clone for InspectorStackInner
impl Clone for InspectorStackInner
Source§impl Debug for InspectorStackInner
impl Debug for InspectorStackInner
Auto Trait Implementations§
impl !Freeze for InspectorStackInner
impl !RefUnwindSafe for InspectorStackInner
impl !UnwindSafe for InspectorStackInner
impl Send for InspectorStackInner
impl Sync for InspectorStackInner
impl Unpin for InspectorStackInner
impl UnsafeUnpin for InspectorStackInner
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> ErasedDestructor for Twhere
T: 'static,
§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<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
§fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
TxEnv] from a transaction and a sender address.§impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnvwhere
TxEnv: FromTxWithEncoded<T>,
impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnvwhere
TxEnv: FromTxWithEncoded<T>,
§fn from_encoded_tx(tx: &&T, sender: Address, encoded: Bytes) -> TxEnv
fn from_encoded_tx(tx: &&T, sender: Address, encoded: Bytes) -> TxEnv
TxEnv] from a transaction, its sender, and encoded transaction bytes.§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> 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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].impl<T> MaybeCompact for T
§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>
renamed to 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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§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> Threaded<T> for T
impl<T> Threaded<T> for T
§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> ⓘ
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: 824 bytes