pub struct BrickProfiler { /* private fields */ }Expand description
Per-brick profiler using pure Rust timing.
§Design (PAR-073, PAR-200)
- Uses
std::time::Instantfor timing (no CUDA event FFI) - PAR-200: O(1) hot path with
BrickIdenum + array storage - GPU operations require explicit sync before timing point
- Supports deferred sync mode for low-overhead production profiling
- Aggregates statistics per brick name
§Usage
use trueno::brick::{BrickProfiler, BrickId, SyncMode};
let mut profiler = BrickProfiler::new();
profiler.enable();
// Fast path: use BrickId for known bricks (PAR-200)
let timer = profiler.start_brick(BrickId::RmsNorm);
// ... do work ...
// For GPU: cuda_stream.synchronize() HERE
profiler.stop_brick(timer, 1);
// Legacy path: string-based (slower, for unknown bricks)
let timer = profiler.start("CustomBrick");
profiler.stop(timer, 1);
// Deferred sync mode (production)
profiler.set_sync_mode(SyncMode::Deferred);
profiler.record_deferred(BrickId::RmsNorm, start_ns, 1);
// ... more operations ...
cuda_stream.synchronize();
profiler.finalize(end_ns);
// Get statistics
let stats = profiler.brick_stats(BrickId::RmsNorm);
println!("RmsNorm avg: {:.2}µs", stats.avg_us());
// Get category breakdown
let cats = profiler.category_stats();
println!("Attention: {:.1}%", cats[BrickCategory::Attention as usize].percentage(profiler.total_ns()));Implementations§
Source§impl BrickProfiler
impl BrickProfiler
Sourcepub fn record_checksum(
&mut self,
name: &str,
layer_idx: usize,
position: u32,
output: &[f32],
)
pub fn record_checksum( &mut self, name: &str, layer_idx: usize, position: u32, output: &[f32], )
Record a kernel trace with output checksum for divergence detection.
This enables automated CPU/GPU divergence detection by capturing output checksums alongside timing data. When GPU produces wrong output, this identifies WHICH kernel diverged without hours of manual debugging.
Five-Whys Root Cause: Hours of manual “let me check X in Y” debugging -> No automated tool identified which kernel diverged -> BrickProfiler only captured timing, not checksums -> Missing feature: per-kernel checksum capture
§Arguments
name: Brick/kernel namelayer_idx: Layer index (0-N for transformer layers)position: Position in sequenceoutput: Output tensor data (first 64 floats checksummed)
§Example
// After RoPE kernel
profiler.record_checksum("RopeNeox", layer_idx, position, &q_rotated);Sourcepub fn get_checksums(&self) -> &[KernelChecksum]
pub fn get_checksums(&self) -> &[KernelChecksum]
Get all kernel checksums for divergence comparison.
Sourcepub fn find_divergence(
&self,
reference: &BrickProfiler,
) -> Option<DivergenceInfo>
pub fn find_divergence( &self, reference: &BrickProfiler, ) -> Option<DivergenceInfo>
Compare checksums with a reference profiler (e.g., CPU baseline).
Returns None if all checksums match, or the first divergent kernel.
Sourcepub fn reset_checksums(&mut self)
pub fn reset_checksums(&mut self)
Reset checksum tracking (call before new forward pass).
Source§impl BrickProfiler
impl BrickProfiler
Sourcepub fn enable_graph(&mut self)
pub fn enable_graph(&mut self)
Enable execution graph tracking.
When enabled, the profiler records the execution hierarchy:
- Layer → Brick → Kernel relationships
- PTX hashes for kernel identity
- Timing data per node
Sourcepub fn disable_graph(&mut self)
pub fn disable_graph(&mut self)
Disable execution graph tracking.
Sourcepub fn is_graph_enabled(&self) -> bool
pub fn is_graph_enabled(&self) -> bool
Check if execution graph tracking is enabled.
Sourcepub fn execution_graph(&self) -> &ExecutionGraph
pub fn execution_graph(&self) -> &ExecutionGraph
Get the execution graph (immutable).
Sourcepub fn execution_graph_mut(&mut self) -> &mut ExecutionGraph
pub fn execution_graph_mut(&mut self) -> &mut ExecutionGraph
Get the execution graph (mutable).
Sourcepub fn graph_push_scope(
&mut self,
node: ExecutionNode,
) -> Option<ExecutionNodeId>
pub fn graph_push_scope( &mut self, node: ExecutionNode, ) -> Option<ExecutionNodeId>
Sourcepub fn graph_pop_scope(&mut self) -> Option<ExecutionNodeId>
pub fn graph_pop_scope(&mut self) -> Option<ExecutionNodeId>
Pop the current scope.
Sourcepub fn graph_record_brick(
&mut self,
brick_id: BrickId,
timing_ns: u64,
elements: u64,
) -> Option<ExecutionNodeId>
pub fn graph_record_brick( &mut self, brick_id: BrickId, timing_ns: u64, elements: u64, ) -> Option<ExecutionNodeId>
Record a brick in the execution graph.
This should be called after stop_brick() with the timing data.
Sourcepub fn graph_record_kernel(
&mut self,
name: &str,
ptx_hash: u64,
grid: (u32, u32, u32),
block: (u32, u32, u32),
shared_mem: u32,
) -> Option<ExecutionNodeId>
pub fn graph_record_kernel( &mut self, name: &str, ptx_hash: u64, grid: (u32, u32, u32), block: (u32, u32, u32), shared_mem: u32, ) -> Option<ExecutionNodeId>
Record a kernel launch in the execution graph.
§Arguments
name: Kernel name (e.g., “batched_q4k_gemv”)ptx_hash: FNV-1a hash of PTX source for identitygrid: Grid dimensions (blocks)block: Block dimensions (threads)shared_mem: Shared memory bytes
Sourcepub fn graph_to_dot(&self) -> String
pub fn graph_to_dot(&self) -> String
Export execution graph to DOT format for visualization.
Use with Graphviz: dot -Tsvg output.dot -o graph.svg
Sourcepub fn graph_to_csr(&self) -> CsrGraph
pub fn graph_to_csr(&self) -> CsrGraph
Export execution graph to trueno-graph CsrGraph.
Sourcepub fn graph_clear(&mut self)
pub fn graph_clear(&mut self)
Clear the execution graph.
Sourcepub fn graph_is_scope_balanced(&self) -> bool
pub fn graph_is_scope_balanced(&self) -> bool
Check if the execution graph scope stack is balanced.
Source§impl BrickProfiler
impl BrickProfiler
Sourcepub fn start(&self, name: &str) -> BrickTimer
pub fn start(&self, name: &str) -> BrickTimer
Start timing a brick. Returns timer handle.
IMPORTANT: For GPU operations, call sync AFTER the operation completes but BEFORE calling stop().
Sourcepub fn stop(&mut self, timer: BrickTimer, elements: u64)
pub fn stop(&mut self, timer: BrickTimer, elements: u64)
Stop timing and record the sample.
§Arguments
timer: Timer handle fromstart()elements: Number of elements (tokens) processed
Sourcepub fn record_elapsed(&mut self, name: &str, elapsed: Duration, elements: u64)
pub fn record_elapsed(&mut self, name: &str, elapsed: Duration, elements: u64)
Record a pre-measured duration for a brick.
PAR-073: This method allows timing with raw Instant calls, avoiding
borrow conflicts when profiling CUDA operations that also need &mut self.
§Arguments
name: Brick nameelapsed: Duration of the operation (fromInstant::elapsed())elements: Number of elements (tokens) processed
§Example
let start = std::time::Instant::now();
cuda_stream.synchronize()?;
self.some_cuda_operation()?;
cuda_stream.synchronize()?;
let elapsed = start.elapsed();
self.profiler.record_elapsed("SomeBrick", elapsed, 1);Sourcepub fn record_elapsed_with_bytes(
&mut self,
name: &str,
elapsed: Duration,
elements: u64,
input_bytes: u64,
output_bytes: u64,
)
pub fn record_elapsed_with_bytes( &mut self, name: &str, elapsed: Duration, elements: u64, input_bytes: u64, output_bytes: u64, )
PMAT-451: Record elapsed time with byte metrics for compression workloads.
§Arguments
name: Brick nameelapsed: Duration of the operationelements: Number of elements (pages) processedinput_bytes: Original uncompressed sizeoutput_bytes: Compressed output size
§Example
let start = std::time::Instant::now();
let compressed = zstd_compress(&page_data);
let elapsed = start.elapsed();
profiler.record_elapsed_with_bytes(
"ZstdCompress",
elapsed,
1,
page_data.len() as u64,
compressed.len() as u64,
);Sourcepub fn set_brick_bottleneck(&mut self, name: &str, bottleneck: BrickBottleneck)
pub fn set_brick_bottleneck(&mut self, name: &str, bottleneck: BrickBottleneck)
PMAT-451: Set bottleneck classification for a brick.
Sourcepub fn stats(&self, name: &str) -> Option<&BrickStats>
pub fn stats(&self, name: &str) -> Option<&BrickStats>
Get statistics for a specific brick by name.
First checks known BrickId types (O(1)), then falls back to dynamic stats.
Sourcepub fn all_stats(&self) -> &HashMap<String, BrickStats>
👎Deprecated since 0.12.0: Use all_brick_stats() for complete statistics
pub fn all_stats(&self) -> &HashMap<String, BrickStats>
Use all_brick_stats() for complete statistics
Get all brick statistics (legacy API, returns dynamic stats only).
For full statistics including known bricks, use all_brick_stats() instead.
Sourcepub fn all_brick_stats(&self) -> impl Iterator<Item = &BrickStats>
pub fn all_brick_stats(&self) -> impl Iterator<Item = &BrickStats>
Get all brick statistics including both known and dynamic bricks.
Sourcepub fn brick_names(&self) -> Vec<String>
pub fn brick_names(&self) -> Vec<String>
Get all brick names.
Source§impl BrickProfiler
impl BrickProfiler
Sourcepub fn print_category_stats(&self)
pub fn print_category_stats(&self)
Print category breakdown to console.
Sourcepub fn to_json(&self) -> String
pub fn to_json(&self) -> String
Export profiling data as JSON for pmat metrics integration.
Format compatible with .pmat-metrics/trends/ structure:
{
"total_tokens": 1000,
"total_ns": 5000000,
"total_throughput": 200000.0,
"bricks": [
{
"name": "RmsNorm",
"count": 10,
"total_ns": 1000000,
"avg_us": 100.0,
"min_us": 90.0,
"max_us": 120.0,
"throughput": 10000.0,
"pct": 20.0
}
]
}Sourcepub fn write_json(&self, path: &Path) -> Result<()>
pub fn write_json(&self, path: &Path) -> Result<()>
Write profiling data to a JSON file for pmat tracking.
§Errors
Returns error if file cannot be written.
Sourcepub fn tile_summary(&self) -> String
pub fn tile_summary(&self) -> String
Generate tile profiling summary report.
§Example Output
=== Tile Profiling Summary (TILING-SPEC-001) ===
Level Samples Avg µs GFLOP/s AI Elements
Macro 128 1234.5 12.34 0.50 1048576
Midi 2048 78.2 45.67 2.00 65536
Micro 32768 4.9 89.12 4.00 4096Sourcepub fn tile_stats_to_json(&self) -> String
pub fn tile_stats_to_json(&self) -> String
Export tile statistics as JSON.
Compatible with pmat metrics integration.
Source§impl BrickProfiler
impl BrickProfiler
Sourcepub fn enable_tile_profiling(&mut self)
pub fn enable_tile_profiling(&mut self)
Enable tile-level profiling.
When enabled, start_tile()/stop_tile() record per-tile statistics
for Macro/Midi/Micro tile hierarchy.
Sourcepub fn disable_tile_profiling(&mut self)
pub fn disable_tile_profiling(&mut self)
Disable tile-level profiling.
Sourcepub fn is_tile_profiling_enabled(&self) -> bool
pub fn is_tile_profiling_enabled(&self) -> bool
Check if tile profiling is enabled.
Sourcepub fn start_tile(&self, level: TileLevel, row: u32, col: u32) -> TileTimer
pub fn start_tile(&self, level: TileLevel, row: u32, col: u32) -> TileTimer
Start timing a tile execution.
Returns a TileTimer that should be passed to stop_tile() after
the tile computation completes.
§Arguments
level: Tile hierarchy level (Macro/Midi/Micro)row: Row index within parent tilecol: Column index within parent tile
§Example
let timer = profiler.start_tile(TileLevel::Macro, 0, 0);
// ... execute tile computation ...
profiler.stop_tile(timer, 256 * 256, 2 * 256 * 256 * 256);Sourcepub fn stop_tile(&mut self, timer: TileTimer, elements: u64, flops: u64)
pub fn stop_tile(&mut self, timer: TileTimer, elements: u64, flops: u64)
Stop timing and record tile statistics.
§Arguments
timer: Timer handle fromstart_tile()elements: Number of elements processed by this tileflops: Number of floating-point operations performed
Sourcepub fn tile_stats(&self, level: TileLevel) -> &TileStats
pub fn tile_stats(&self, level: TileLevel) -> &TileStats
Get tile statistics for a given level.
Sourcepub fn tile_stats_mut(&mut self, level: TileLevel) -> &mut TileStats
pub fn tile_stats_mut(&mut self, level: TileLevel) -> &mut TileStats
Get mutable tile statistics for a given level.
Sourcepub fn all_tile_stats(&self) -> &[TileStats; 3]
pub fn all_tile_stats(&self) -> &[TileStats; 3]
Get all tile statistics as a slice.
Sourcepub fn reset_tile_stats(&mut self)
pub fn reset_tile_stats(&mut self)
Reset tile statistics for all levels.
Source§impl BrickProfiler
impl BrickProfiler
Sourcepub fn set_sync_mode(&mut self, mode: SyncMode)
pub fn set_sync_mode(&mut self, mode: SyncMode)
Set the synchronization mode for GPU profiling.
§Modes
Immediate: Sync after each kernel (accurate but slow)PerLayer: Sync once per transformer layerDeferred: Sync once per forward pass (default, fast)None: No synchronization
Sourcepub fn reset_epoch(&mut self)
pub fn reset_epoch(&mut self)
Reset the epoch for deferred timing. Call this at the start of a forward pass.
Sourcepub fn elapsed_ns(&self) -> u64
pub fn elapsed_ns(&self) -> u64
Get nanoseconds elapsed since epoch.
Sourcepub fn start_brick(&self, brick_id: BrickId) -> BrickIdTimer
pub fn start_brick(&self, brick_id: BrickId) -> BrickIdTimer
Start timing a brick using BrickId (O(1) hot path).
This is the preferred API for known brick types.
For GPU operations, call stream.synchronize() before stop_brick().
Sourcepub fn stop_brick(&mut self, timer: BrickIdTimer, elements: u64)
pub fn stop_brick(&mut self, timer: BrickIdTimer, elements: u64)
Stop timing and record the sample (O(1) hot path).
Sourcepub fn brick_stats(&self, brick_id: BrickId) -> &BrickStats
pub fn brick_stats(&self, brick_id: BrickId) -> &BrickStats
Get statistics for a known brick type (O(1)).
Sourcepub fn brick_stats_mut(&mut self, brick_id: BrickId) -> &mut BrickStats
pub fn brick_stats_mut(&mut self, brick_id: BrickId) -> &mut BrickStats
Get mutable statistics for a known brick type (O(1)).
Sourcepub fn record_deferred(
&mut self,
brick_id: BrickId,
start_ns: u64,
elements: u64,
)
pub fn record_deferred( &mut self, brick_id: BrickId, start_ns: u64, elements: u64, )
Record a measurement without GPU sync (deferred mode).
Call finalize() after GPU sync to apply all pending measurements.
§Arguments
brick_id: The brick typestart_ns: Start time (fromelapsed_ns()at operation start)elements: Number of elements processed
Sourcepub fn record_deferred_dynamic(
&mut self,
name: &str,
start_ns: u64,
elements: u64,
)
pub fn record_deferred_dynamic( &mut self, name: &str, start_ns: u64, elements: u64, )
Record a measurement for a dynamic brick (deferred mode).
Sourcepub fn finalize(&mut self, end_ns: u64)
pub fn finalize(&mut self, end_ns: u64)
Finalize all pending measurements after GPU sync.
Must be called after stream.synchronize() to get accurate timing.
§Arguments
end_ns: End time (fromelapsed_ns()after sync)
Sourcepub fn has_pending(&self) -> bool
pub fn has_pending(&self) -> bool
Check if there are pending measurements.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Get number of pending measurements.
Sourcepub fn category_stats(&self) -> [CategoryStats; 7]
pub fn category_stats(&self) -> [CategoryStats; 7]
Get aggregated statistics by category.
Returns an array indexed by BrickCategory as usize.
Sourcepub fn set_l2_cache_hit_rate(&mut self, rate: f32)
pub fn set_l2_cache_hit_rate(&mut self, rate: f32)
Set L2 cache hit rate (v1.1.0 OBSERVE phase)
Sourcepub fn l2_cache_hit_rate(&self) -> Option<f32>
pub fn l2_cache_hit_rate(&self) -> Option<f32>
Get L2 cache hit rate
Sourcepub fn set_zero_copy(&mut self, enabled: bool)
pub fn set_zero_copy(&mut self, enabled: bool)
Set zero-copy mode (v1.1.0 OBSERVE phase)
Sourcepub fn is_zero_copy(&self) -> bool
pub fn is_zero_copy(&self) -> bool
Check if zero-copy is enabled
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if profiling is enabled.
Sourcepub fn total_throughput(&self) -> f64
pub fn total_throughput(&self) -> f64
Get total throughput across all bricks.
Sourcepub fn total_tokens(&self) -> u64
pub fn total_tokens(&self) -> u64
Get total tokens processed.
Source§impl BrickProfiler
impl BrickProfiler
Sourcepub fn get_tuner_recommendations(
&self,
config: &RunConfig,
) -> Option<TunerRecommendation>
pub fn get_tuner_recommendations( &self, config: &RunConfig, ) -> Option<TunerRecommendation>
Get ML-based tuning recommendations.
Extracts features from current profile and returns recommendations.
Sourcepub fn print_tuner_recommendations(&self, config: &RunConfig)
pub fn print_tuner_recommendations(&self, config: &RunConfig)
Print tuner recommendations to console.
Sourcepub fn tokens_per_sec(&self) -> Option<f32>
pub fn tokens_per_sec(&self) -> Option<f32>
Get tokens per second from profiler.
Trait Implementations§
Source§impl Debug for BrickProfiler
impl Debug for BrickProfiler
Auto Trait Implementations§
impl Freeze for BrickProfiler
impl RefUnwindSafe for BrickProfiler
impl Send for BrickProfiler
impl Sync for BrickProfiler
impl Unpin for BrickProfiler
impl UnsafeUnpin for BrickProfiler
impl UnwindSafe for BrickProfiler
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> FmtForward for T
impl<T> FmtForward for T
Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.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> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§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 moreSource§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 moreSource§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
Source§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
Source§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.Source§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.Source§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.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Tap for T
impl<T> Tap for T
Source§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.