pub struct WorkerCorpus {Show 18 fields
id: usize,
in_memory_corpus: Vec<CorpusEntry>,
history_map: Vec<u8>,
edge_indices: EdgeIndexMap,
sancov_history_map: Vec<u8>,
pub(crate) failed_replays: usize,
pub(crate) metrics: CorpusMetrics,
sequence_generator: SequenceGenerator,
current_mutated_index: Option<usize>,
config: Arc<FuzzCorpusConfig>,
worker_sync_enabled: bool,
new_entry_indices: Vec<usize>,
initial_export_dirs: Option<Vec<PathBuf>>,
worker_dir: Option<PathBuf>,
last_sync_metrics: CorpusMetrics,
optimization_best_value: Option<I256>,
optimization_best_sequence: Vec<BasicTxDetails>,
last_new_edge_at: Option<Instant>,
}Expand description
Per-worker corpus manager.
Fields§
§id: usizeWorker Id
in_memory_corpus: Vec<CorpusEntry>In-memory corpus entries populated from the persisted files and runs administered by this worker.
history_map: Vec<u8>History of binned hitcount of edges seen during fuzzing
edge_indices: EdgeIndexMapStable dense EVM edge IDs for this worker’s history map.
sancov_history_map: Vec<u8>History of binned hitcount of sancov (native Rust) edges seen during fuzzing
failed_replays: usizeNumber of failed replays from initial corpus
metrics: CorpusMetricsWorker Metrics
sequence_generator: SequenceGeneratorShared transaction-sequence generator.
current_mutated_index: Option<usize>Identifier of current mutated entry for this worker.
config: Arc<FuzzCorpusConfig>Config
worker_sync_enabled: boolWhether this corpus participates in stateless worker synchronization.
new_entry_indices: Vec<usize>Sorted indices of new entries added to WorkerCorpus::in_memory_corpus since last sync.
initial_export_dirs: Option<Vec<PathBuf>>Corpus directories the master loaded at startup and still needs to distribute.
worker_dir: Option<PathBuf>Worker Dir corpus_dir/worker1/
last_sync_metrics: CorpusMetricsMetrics at last sync - used to calculate deltas while syncing with global metrics
optimization_best_value: Option<I256>Optimization mode: the best value found so far (loaded from disk or discovered in-run).
optimization_best_sequence: Vec<BasicTxDetails>Optimization mode: the call sequence that produced the best value.
last_new_edge_at: Option<Instant>Monotonic time the worker’s local map last gained a first-time edge; None until then.
Updated wherever the map grows: live fuzzing, startup replay, and cross-worker sync. Tracks
local discovery (an edge new to this worker), not globally unique discovery. Kept out of
CorpusMetrics since a timestamp is neither additive across workers nor serializable.
Implementations§
Source§impl WorkerCorpus
impl WorkerCorpus
Sourcepub fn new_sequence(
&mut self,
test_runner: &mut TestRunner,
) -> Result<SequencePlan>
pub fn new_sequence( &mut self, test_runner: &mut TestRunner, ) -> Result<SequencePlan>
Produces the next sequence for either execution mode.
pub fn new<FEN: FoundryEvmNetwork>( id: usize, config: FuzzCorpusConfig, sequence_generator: SequenceGenerator, executor: Option<&Executor<FEN>>, target: ReplayTarget<'_>, ) -> Result<Self>
pub(crate) fn from_seed( id: usize, config: FuzzCorpusConfig, sequence_generator: SequenceGenerator, seed: WorkerCorpusSeed, ) -> Result<Self>
Sourcepub fn process_inputs(
&mut self,
inputs: &[BasicTxDetails],
cmp_seq: &[Vec<CmpOperands>],
new_coverage: bool,
optimization: Option<(I256, Vec<BasicTxDetails>)>,
)
pub fn process_inputs( &mut self, inputs: &[BasicTxDetails], cmp_seq: &[Vec<CmpOperands>], new_coverage: bool, optimization: Option<(I256, Vec<BasicTxDetails>)>, )
Updates stats for the given call sequence, if new coverage produced. Persists the call sequence (if corpus directory is configured and new coverage or improved optimization value) and updates in-memory corpus.
Sourcepub fn process_inputs_for_campaign(
&mut self,
inputs: &[BasicTxDetails],
cmp_seq: &[Vec<CmpOperands>],
new_coverage: bool,
optimization: Option<(I256, Vec<BasicTxDetails>)>,
) -> Option<CampaignCorpusEntry>
pub fn process_inputs_for_campaign( &mut self, inputs: &[BasicTxDetails], cmp_seq: &[Vec<CmpOperands>], new_coverage: bool, optimization: Option<(I256, Vec<BasicTxDetails>)>, ) -> Option<CampaignCorpusEntry>
Updates worker-local corpus state and returns any corpus entry to persist after the logical campaign has merged worker outputs.
fn process_inputs_inner( &mut self, inputs: &[BasicTxDetails], cmp_seq: &[Vec<CmpOperands>], new_coverage: bool, optimization: Option<(I256, Vec<BasicTxDetails>)>, persist_now: bool, ) -> Option<CampaignCorpusEntry>
fn insert_corpus_entry( &mut self, corpus: CorpusEntry, insertion_mode: CorpusInsertionMode, dedupe_by_coverage: bool, ) -> Option<CampaignCorpusEntry>
fn push_corpus_entry(&mut self, corpus: CorpusEntry)
Sourcepub fn optimization_initial_state(&self) -> (Option<I256>, Vec<BasicTxDetails>)
pub fn optimization_initial_state(&self) -> (Option<I256>, Vec<BasicTxDetails>)
Returns the previously persisted optimization best value and sequence (if any).
Sourcefn persist_optimization_state(&self)
fn persist_optimization_state(&self)
Persists the current optimization best value and sequence to disk.
Sourcepub(crate) fn persist_campaign_outputs(
config: &FuzzCorpusConfig,
entries: impl IntoIterator<Item = CampaignCorpusEntry>,
optimization_best: Option<(I256, &[BasicTxDetails])>,
)
pub(crate) fn persist_campaign_outputs( config: &FuzzCorpusConfig, entries: impl IntoIterator<Item = CampaignCorpusEntry>, optimization_best: Option<(I256, &[BasicTxDetails])>, )
Persists logical-campaign corpus and optimization outputs after worker results have merged.
Sourcepub fn merge_edge_coverage<FEN: FoundryEvmNetwork>(
&mut self,
call_result: &mut RawCallResult<FEN>,
) -> bool
pub fn merge_edge_coverage<FEN: FoundryEvmNetwork>( &mut self, call_result: &mut RawCallResult<FEN>, ) -> bool
Collects EVM and sancov coverage from call result and updates metrics.
Sourcepub(crate) fn time_since_new_edge(&self) -> Option<Duration>
pub(crate) fn time_since_new_edge(&self) -> Option<Duration>
Time since this worker last gained a first-time edge; None until it has seen one. See
WorkerCorpus::last_new_edge_at for the local-vs-global caveat.
Sourcepub fn hoist_observed_calls(
&mut self,
observed: &[ObservedCall],
parent_tx: &BasicTxDetails,
targeted_contracts: &FuzzRunIdentifiedContracts,
insertion_mode: CorpusInsertionMode,
) -> Option<CampaignCorpusEntry>
pub fn hoist_observed_calls( &mut self, observed: &[ObservedCall], parent_tx: &BasicTxDetails, targeted_contracts: &FuzzRunIdentifiedContracts, insertion_mode: CorpusInsertionMode, ) -> Option<CampaignCorpusEntry>
Converts replayable observed sub-calls into one normal multi-transaction corpus entry.
This captures calls shaped by a handler or another target call and lets the existing corpus machinery mutate, evict, sync, and persist them like any other interesting sequence.
Sourcepub fn seed_from_test_traces<FEN: FoundryEvmNetwork>(
&mut self,
invariant_contract: &InvariantContract<'_>,
targeted_contracts: &FuzzRunIdentifiedContracts,
executor: &Executor<FEN>,
) -> Result<usize>
pub fn seed_from_test_traces<FEN: FoundryEvmNetwork>( &mut self, invariant_contract: &InvariantContract<'_>, targeted_contracts: &FuzzRunIdentifiedContracts, executor: &Executor<FEN>, ) -> Result<usize>
Seeds the corpus from sibling zero-input unit tests by replaying them on a clone of the post-setUp executor and keeping the direct replayable calls made by each test.
Returns the number of test-derived corpus entries added.
fn push_observed_sequence( &mut self, tx_seq: Vec<BasicTxDetails>, insertion_mode: CorpusInsertionMode, ) -> Option<CampaignCorpusEntry>
Sourcefn evict_oldest_corpus(&mut self) -> Result<()>
fn evict_oldest_corpus(&mut self) -> Result<()>
Flush the oldest corpus mutated more than configured max mutations unless it is favored or pending synchronization.
Sourcefn load_sync_corpus(
&self,
strict: bool,
) -> Result<Vec<(CorpusDirEntry, Vec<BasicTxDetails>)>>
fn load_sync_corpus( &self, strict: bool, ) -> Result<Vec<(CorpusDirEntry, Vec<BasicTxDetails>)>>
Imports the new corpus entries from the sync directory.
These contain tx sequences which are replayed and used to update the history map.
Sourcefn push_synced_corpus_entry(
&mut self,
corpus: CorpusEntry,
timestamp: u64,
file_name: String,
)
fn push_synced_corpus_entry( &mut self, corpus: CorpusEntry, timestamp: u64, file_name: String, )
Adds a calibrated sync entry to the local corpus and queues it for fan-out on the master.
Sourcefn calibrate<FEN: FoundryEvmNetwork>(
&mut self,
executor: &Executor<FEN>,
target: ReplayTarget<'_>,
strict: bool,
) -> Result<()>
fn calibrate<FEN: FoundryEvmNetwork>( &mut self, executor: &Executor<FEN>, target: ReplayTarget<'_>, strict: bool, ) -> Result<()>
Syncs and calibrates the in memory corpus and updates the history_map if new coverage is found from the corpus findings of other workers.
Sourcefn export_to_master(&mut self) -> Result<()>
fn export_to_master(&mut self) -> Result<()>
Exports the new corpus entries to the master worker’s sync dir.
Sourcefn export_to_workers(&mut self, num_workers: usize) -> Result<()>
fn export_to_workers(&mut self, num_workers: usize) -> Result<()>
Exports the global corpus to the sync/ directories of all the non-master workers.
Sourcepub(crate) fn sync_metrics(
&mut self,
global_corpus_metrics: &GlobalCorpusMetrics,
)
pub(crate) fn sync_metrics( &mut self, global_corpus_metrics: &GlobalCorpusMetrics, )
Syncs local metrics with global corpus metrics by calculating and applying deltas.
Sourcepub fn sync<FEN: FoundryEvmNetwork>(
&mut self,
num_workers: usize,
executor: &Executor<FEN>,
target: ReplayTarget<'_>,
global_corpus_metrics: &GlobalCorpusMetrics,
) -> Result<()>
pub fn sync<FEN: FoundryEvmNetwork>( &mut self, num_workers: usize, executor: &Executor<FEN>, target: ReplayTarget<'_>, global_corpus_metrics: &GlobalCorpusMetrics, ) -> Result<()>
Syncs the workers in_memory_corpus and history_map with the findings from other workers.
Sourcepub(crate) fn finalize_sync<FEN: FoundryEvmNetwork>(
&mut self,
executor: &Executor<FEN>,
target: ReplayTarget<'_>,
coordinator: &CorpusSyncCoordinator,
) -> Result<()>
pub(crate) fn finalize_sync<FEN: FoundryEvmNetwork>( &mut self, executor: &Executor<FEN>, target: ReplayTarget<'_>, coordinator: &CorpusSyncCoordinator, ) -> Result<()>
Performs the ordered final synchronization once every worker has stopped fuzzing.
Sourcepub(crate) fn can_replay_tx(
tx: &BasicTxDetails,
stateless: Option<StatelessReplayTarget<'_>>,
fuzzed_contracts: Option<&FuzzRunIdentifiedContracts>,
) -> bool
pub(crate) fn can_replay_tx( tx: &BasicTxDetails, stateless: Option<StatelessReplayTarget<'_>>, fuzzed_contracts: Option<&FuzzRunIdentifiedContracts>, ) -> bool
Helper to check if a tx can be replayed.
Auto Trait Implementations§
impl !RefUnwindSafe for WorkerCorpus
impl !Send for WorkerCorpus
impl !Sync for WorkerCorpus
impl !UnwindSafe for WorkerCorpus
impl Freeze for WorkerCorpus
impl Unpin for WorkerCorpus
impl UnsafeUnpin for WorkerCorpus
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
§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> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 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> 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: 656 bytes