pub struct PreemptionRecord { /* private fields */ }Expand description
A record of all the preemptions and other scheduling events that occur during execution.
Implementations§
Source§impl PreemptionRecord
impl PreemptionRecord
Sourcepub fn with_reserved_input(self, metadata: ReservedInputMetadata) -> Self
pub fn with_reserved_input(self, metadata: ReservedInputMetadata) -> Self
Preserve the source’s optional metadata on an edit. This is not a live producer certificate; unmarked/unknown input remains unmarked/unknown.
Sourcepub fn reserved_input(&self) -> &ReservedInputMetadata
pub fn reserved_input(&self) -> &ReservedInputMetadata
The exact optional standalone JSON metadata, without interpreting it.
Sourcepub fn validate_replay_inputs(
&self,
source: &str,
guest_ids: GuestIds,
) -> Result<(), RecordAdmissionRefusal>
pub fn validate_replay_inputs( &self, source: &str, guest_ids: GuestIds, ) -> Result<(), RecordAdmissionRefusal>
Reconcile numbering and private-input provenance on the complete decoded record that an authoritative replay loader will install.
Sourcepub fn validate_combined_reserved_inputs(
&self,
other: &Self,
) -> Result<(), RecordAdmissionRefusal>
pub fn validate_combined_reserved_inputs( &self, other: &Self, ) -> Result<(), RecordAdmissionRefusal>
Validate a combination before any endpoint or identity shortcut. A Chosen input requires the same recognized descriptor on every source. Non-Chosen edits retain their former admission and opaque metadata.
Source§impl PreemptionRecord
impl PreemptionRecord
Sourcepub fn from_sched_events(events: Vec<SchedEvent>) -> Self
pub fn from_sched_events(events: Vec<SchedEvent>) -> Self
TODO: This is not ideal because PreemptionRecord shouldn’t be doing double duty as an eventlog.
Sourcepub fn expired_wait_runs_charged_once(&self) -> bool
pub fn expired_wait_runs_charged_once(&self) -> bool
Whether the run this record came from charged a run of expired timed
waits one turn (false for each wait charged, and for records that
do not say).
Sourcepub fn with_expired_wait_runs_charged_once(self, once: bool) -> Self
pub fn with_expired_wait_runs_charged_once(self, once: bool) -> Self
The same record, stating how the run it came from charged runs of expired timed waits.
Sourcepub fn schedule_prefix(&self, len: usize) -> PreemptionRecord
pub fn schedule_prefix(&self, len: usize) -> PreemptionRecord
The record a replay of only the first len scheduled events of this
one follows: those events, and the callback checkpoints they reach.
A checkpoint names the callback that ended one of a thread’s slices
and the thread’s progress there (the sum of its events’ counts, as
replay counts it, callback_history::Progress). The checkpoints of
threads the prefix runs, up to the progress each thread reaches in it,
end the prefix’s slices where the recording did, so a replay of the
prefix keeps the software-expiry turns they mark. A schedule replayed
without them has no record of those turns, and its virtual time drifts
from the recording’s. The scheduler runs freely after the prefix, so
later checkpoints are dropped, and so are those of threads the prefix
does not run, progress-0 ones included.
Progress alone places a checkpoint, so one taken at exactly the progress a thread reaches at the prefix end is kept: it ended the thread’s last slice in the prefix. Another one at the same progress, from a later callback of the same handler after other threads ran past the prefix, is kept too, and the replay applies it only when its recorded time and branch count are reached.
The thread that runs the prefix’s last event is the exception while another event follows: its checkpoints at the progress that event reaches end its slice at the prefix’s own end, which decides what runs next, so they belong to the event after the prefix and are dropped. A replay of the prefix then lets that thread run on, as it does past any event the prefix leaves out. A prefix of the whole schedule keeps the record’s checkpoints.
The per-thread histories stay whole, for the rows the checkpoints name; a schedule replay reads only the events and the checkpoints.
Sourcepub fn with_schedule(&self, events: Vec<SchedEvent>) -> Option<PreemptionRecord>
pub fn with_schedule(&self, events: Vec<SchedEvent>) -> Option<PreemptionRecord>
The same record with events as its schedule, or None if its
callback checkpoints do not fit those events (see Self::validate).
For a schedule that replayed this record’s events and went on past
them: its own recording keeps no checkpoints, since a replay records
none, but the replayed part ended its slices where this record did.
Sourcepub fn interpolate_events(
&self,
other: &Self,
events: Vec<SchedEvent>,
) -> Result<Self, String>
pub fn interpolate_events( &self, other: &Self, events: Vec<SchedEvent>, ) -> Result<Self, String>
Attach the metadata of two interpolation inputs to events.
The caller first reconciles the existing guest-ID, signal-copy and other option policies. An exact source schedule keeps that source’s complete record, including callback checkpoints and time jumps. Both formats must agree: a single output cannot follow two charging rules.
A genuinely mixed order has no established mapping for either source’s jumps or checkpoints, so refuse those inputs. For jump/checkpoint-free inputs, every remaining metadata field must agree. Keep those fields, but clear the per-thread priority histories, as an event-order edit follows its global stream rather than either original priority history. Host-observed failure counts must agree too; retain their warning, without claiming that an unrun edit has measured that many failures.
Sourcepub fn chaos_timeslice(&self) -> Option<u64>
pub fn chaos_timeslice(&self) -> Option<u64>
The --max-timeslice the run that produced this record drew under
--chaos-timeslice-draw=run, if it drew one.
Sourcepub fn with_chaos_timeslice(self, timeslice: Option<u64>) -> Self
pub fn with_chaos_timeslice(self, timeslice: Option<u64>) -> Self
The same record, stating the timeslice its run drew.
Sourcepub fn with_time_skips(self, skips: Vec<TimeSkip>) -> Self
pub fn with_time_skips(self, skips: Vec<TimeSkip>) -> Self
The same record, listing skips as its jumps of global time, in format
2 at least when there are any. Analyze and bisect carry a source
record’s jumps into a trial schedule spliced from its prefix.
Sourcepub fn with_current_format(self) -> Self
pub fn with_current_format(self) -> Self
The same record in the newest format (PREEMPTION_RECORD_FORMAT),
which a record from a run of this Hermit has.
Sourcepub fn with_format(self, format: Option<u32>) -> Self
pub fn with_format(self, format: Option<u32>) -> Self
The same record in format (None for format 1). Analyze and bisect
require one shared timing format across the recordings they read
(hermit-cli’s time_skip_carry).
Sourcepub fn format_version(&self) -> Option<u32>
pub fn format_version(&self) -> Option<u32>
The record’s format: None for format 1.
Sourcepub fn charges_replayed_switch_ins(&self) -> bool
pub fn charges_replayed_switch_ins(&self) -> bool
Whether a schedule replay of this record charges a replayed switch-in
under which guest code runs (format 3 or later,
SWITCH_IN_CHARGE_FORMAT).
Sourcepub fn lists_its_time_skips(&self) -> bool
pub fn lists_its_time_skips(&self) -> bool
Whether the record lists every jump of global time its run made (format 2 or later), so that a replay makes exactly those.
Sourcepub fn with_pipe_wake_latency(self, latency: Option<u64>) -> Self
pub fn with_pipe_wake_latency(self, latency: Option<u64>) -> Self
The same record, stating the --pipe-wake-latency of the trials it
came from. Every record analyze, minimize or bisect writes from trials
carries it, so that a replay under another value is refused.
Sourcepub fn pipe_wake_latency(&self) -> Option<u64>
pub fn pipe_wake_latency(&self) -> Option<u64>
The --pipe-wake-latency this record was produced under (None for
off).
Sourcepub fn epoch(&self) -> Option<DateTime<Utc>>
pub fn epoch(&self) -> Option<DateTime<Utc>>
The virtual-time epoch this record was produced under, if it was stored.
Sourcepub fn signal_state_copy(&self) -> Option<bool>
pub fn signal_state_copy(&self) -> Option<bool>
Whether the signal-state copy was on in the run this record came from, if the record says.
Sourcepub fn host_inputs(&self) -> Option<&HostInputSet>
pub fn host_inputs(&self) -> Option<&HostInputSet>
The host files the recorded run’s guest opened, if the record says.
Sourcepub fn store_exclusive_failures(&self) -> u64
pub fn store_exclusive_failures(&self) -> u64
The store-exclusives that failed in the run this record came from (zero where none were counted).
Sourcepub fn replay_departed_at(&self) -> Option<u64>
pub fn replay_departed_at(&self) -> Option<u64>
A retained source event count where a replay omitted a change point. After transformations it need not index this record’s global events.
Sourcepub fn require_faithful_replay(&self) -> Result<()>
pub fn require_faithful_replay(&self) -> Result<()>
Refuse a known omission before replay or analysis can certify it. Unmarked legacy records retain their existing admission policy; their absence of this field is not proof of historical completeness.
Sourcepub fn retain_replay_departure(self, source: Option<u64>) -> Self
pub fn retain_replay_departure(self, source: Option<u64>) -> Self
Retain an omission observed in a source record, never clearing one. When sources differ, the smaller count is only a retained source observation: it is neither a common causal order nor an event index in a transformed output. Admission depends only on its presence.
Sourcepub fn with_signal_state_copy(self, on: Option<bool>) -> Self
pub fn with_signal_state_copy(self, on: Option<bool>) -> Self
The same record, stating whether the copy was on in the trials it
came from (None for unknown). Every record analyze, minimize or
bisect writes from trials carries it, as it carries the pipe-wake
latency.
Sourcepub fn with_cap_preemption_charge(self, on: bool) -> Self
pub fn with_cap_preemption_charge(self, on: bool) -> Self
The same record, stating whether the trials it came from capped preemption charges, as it states the pipe-wake latency.
Sourcepub fn cap_preemption_charge(&self) -> bool
pub fn cap_preemption_charge(&self) -> bool
Whether this record was produced under --cap-preemption-charge.
Sourcepub fn guest_ids(&self) -> Option<GuestIds>
pub fn guest_ids(&self) -> Option<GuestIds>
How the run this record came from numbered its guest, if no PID namespace of its own did.
Sourcepub fn with_guest_ids(self, ids: GuestIds) -> Self
pub fn with_guest_ids(self, ids: GuestIds) -> Self
The same record, retaining the guest numbering of schedules used to construct it. Namespace numbering keeps the legacy omitted field.
Sourcepub fn extract_all(&self) -> BTreeMap<DetTid, ThreadHistory>
pub fn extract_all(&self) -> BTreeMap<DetTid, ThreadHistory>
Make a copy of everything in the PreemptionRecord in a public format.
Sourcepub fn strip_contents(self) -> Self
pub fn strip_contents(self) -> Self
TODO: provide a better way to create an empty PreemptionRecord but with entries for a given set of tids.
Sourcepub fn split_map<F, R>(&mut self, splitter: F)
pub fn split_map<F, R>(&mut self, splitter: F)
Iterates over each sched event and applies function event -> *event yielding resulting iterator as new events This effectively moves content of global allowing to split or delete events based on the function provided
Sourcepub fn schedevents_iter_mut(&mut self) -> IterMut<'_, SchedEvent>
pub fn schedevents_iter_mut(&mut self) -> IterMut<'_, SchedEvent>
Iterate over the schedevents.
Sourcepub fn preemptions_only(&mut self)
pub fn preemptions_only(&mut self)
Leave only the per-thread preemption records, not the global schedule.
Sourcepub fn clone_preemptions_only(&self) -> Self
pub fn clone_preemptions_only(&self) -> Self
Make a copy just of the preemptions (cheap) rather than the whole schedule trace (expensive)
Sourcepub fn schedevents(&self) -> &Vec<SchedEvent>
pub fn schedevents(&self) -> &Vec<SchedEvent>
Read-only access to the raw event schedule.
Sourcepub fn contains_schedevents(&self) -> bool
pub fn contains_schedevents(&self) -> bool
Returns true if the schedule trace (SchedEvent) record is nonempty.
Sourcepub fn from_vecs(bt: &BTreeMap<DetTid, Vec<(LogicalTime, Priority)>>) -> Self
pub fn from_vecs(bt: &BTreeMap<DetTid, Vec<(LogicalTime, Priority)>>) -> Self
Convert from a flat vector representation (Time,Priority_AFTER_Time) into the internal representation. The very first timeslice should have a zero timestamp, but it is ignored if nonzero.
Sourcepub fn time_skips(&self) -> Option<&[TimeSkip]>
pub fn time_skips(&self) -> Option<&[TimeSkip]>
The jumps of global time the recorder saw (time_skips), or None
when the record does not say.
Sourcepub fn into_global(self) -> Vec<SchedEvent>
pub fn into_global(self) -> Vec<SchedEvent>
Extracts the inner global events.
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Perform internal invariant checks on the PreemptionRecord and return an error if it is not well formed.
Sourcepub fn validate_contents(&self) -> Result<(), String>
pub fn validate_contents(&self) -> Result<(), String>
Check everything Self::validate does but the format
(Self::validate_format), whose failure is a refusal rather than a
malformed record, and which readers check separately for that reason.
Sourcepub fn validate_format(&self) -> Result<(), String>
pub fn validate_format(&self) -> Result<(), String>
Check the record’s format and its jumps of global time: a format this
Hermit reads, with the list that format requires, in stream order, to
later and finite deadlines. A failure is a refusal of the record, not a
malformed file (RecordFormatRefusal).
Sourcepub fn normalize(&self) -> PreemptionRecord
pub fn normalize(&self) -> PreemptionRecord
Normalize priorities for readibility.
Sourcepub fn with_latest_preempt_removed(&self) -> PreemptionRecord
pub fn with_latest_preempt_removed(&self) -> PreemptionRecord
Remove whichever is the latest preemption across all thread histories. If there are no priority changes in any thread history, the entire last thread (highest thread number) is completely removed. Note this function assumes the last priority change in the list has the latest preempt time.
Trait Implementations§
Source§impl Clone for PreemptionRecord
impl Clone for PreemptionRecord
Source§fn clone(&self) -> PreemptionRecord
fn clone(&self) -> PreemptionRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PreemptionRecord
impl Debug for PreemptionRecord
Source§impl Default for PreemptionRecord
impl Default for PreemptionRecord
Source§fn default() -> PreemptionRecord
fn default() -> PreemptionRecord
Source§impl<'de> Deserialize<'de> for PreemptionRecord
impl<'de> Deserialize<'de> for PreemptionRecord
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl Display for PreemptionRecord
impl Display for PreemptionRecord
impl Eq for PreemptionRecord
Source§impl Hash for PreemptionRecord
impl Hash for PreemptionRecord
Source§impl PartialEq for PreemptionRecord
impl PartialEq for PreemptionRecord
Source§impl Serialize for PreemptionRecord
impl Serialize for PreemptionRecord
impl StructuralPartialEq for PreemptionRecord
Auto Trait Implementations§
impl Freeze for PreemptionRecord
impl RefUnwindSafe for PreemptionRecord
impl Send for PreemptionRecord
impl Sync for PreemptionRecord
impl Unpin for PreemptionRecord
impl UnsafeUnpin for PreemptionRecord
impl UnwindSafe for PreemptionRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<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>
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> 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.