pub struct GpuDevice {
pub device: Device,
pub queue: Queue,
}Expand description
GPU device manager
Fields§
§device: Device§queue: QueueImplementations§
Source§impl GpuDevice
impl GpuDevice
Sourcepub fn relu(&self, input: &[f32], result: &mut [f32]) -> Result<(), String>
pub fn relu(&self, input: &[f32], result: &mut [f32]) -> Result<(), String>
Execute ReLU activation on GPU: result[i] = max(0, input[i]) (sync, native only)
Sourcepub async fn relu_async(
&self,
input: &[f32],
result: &mut [f32],
) -> Result<(), String>
pub async fn relu_async( &self, input: &[f32], result: &mut [f32], ) -> Result<(), String>
Execute ReLU activation on GPU (async, works on all platforms)
Sourcepub fn leaky_relu(
&self,
input: &[f32],
result: &mut [f32],
negative_slope: f32,
) -> Result<(), String>
pub fn leaky_relu( &self, input: &[f32], result: &mut [f32], negative_slope: f32, ) -> Result<(), String>
Execute leaky ReLU activation on GPU (sync, native only)
Sourcepub async fn leaky_relu_async(
&self,
input: &[f32],
result: &mut [f32],
negative_slope: f32,
) -> Result<(), String>
pub async fn leaky_relu_async( &self, input: &[f32], result: &mut [f32], negative_slope: f32, ) -> Result<(), String>
Execute leaky ReLU activation on GPU (async, works on all platforms)
Sourcepub fn elu(
&self,
input: &[f32],
result: &mut [f32],
alpha: f32,
) -> Result<(), String>
pub fn elu( &self, input: &[f32], result: &mut [f32], alpha: f32, ) -> Result<(), String>
Execute ELU activation on GPU (sync, native only)
Sourcepub async fn elu_async(
&self,
input: &[f32],
result: &mut [f32],
alpha: f32,
) -> Result<(), String>
pub async fn elu_async( &self, input: &[f32], result: &mut [f32], alpha: f32, ) -> Result<(), String>
Execute ELU activation on GPU (async, works on all platforms)
Sourcepub fn sigmoid(&self, input: &[f32], result: &mut [f32]) -> Result<(), String>
pub fn sigmoid(&self, input: &[f32], result: &mut [f32]) -> Result<(), String>
Execute sigmoid activation on GPU (sync, native only)
Sourcepub async fn sigmoid_async(
&self,
input: &[f32],
result: &mut [f32],
) -> Result<(), String>
pub async fn sigmoid_async( &self, input: &[f32], result: &mut [f32], ) -> Result<(), String>
Execute sigmoid activation on GPU (async, works on all platforms)
Sourcepub fn tanh(&self, input: &[f32], result: &mut [f32]) -> Result<(), String>
pub fn tanh(&self, input: &[f32], result: &mut [f32]) -> Result<(), String>
Execute tanh activation on GPU (sync, native only)
Sourcepub async fn tanh_async(
&self,
input: &[f32],
result: &mut [f32],
) -> Result<(), String>
pub async fn tanh_async( &self, input: &[f32], result: &mut [f32], ) -> Result<(), String>
Execute tanh activation on GPU (async, works on all platforms)
Sourcepub fn swish(&self, input: &[f32], result: &mut [f32]) -> Result<(), String>
pub fn swish(&self, input: &[f32], result: &mut [f32]) -> Result<(), String>
Execute swish activation on GPU (sync, native only)
Sourcepub async fn swish_async(
&self,
input: &[f32],
result: &mut [f32],
) -> Result<(), String>
pub async fn swish_async( &self, input: &[f32], result: &mut [f32], ) -> Result<(), String>
Execute swish activation on GPU (async, works on all platforms)
Sourcepub fn gelu(&self, input: &[f32], result: &mut [f32]) -> Result<(), String>
pub fn gelu(&self, input: &[f32], result: &mut [f32]) -> Result<(), String>
Execute GELU activation on GPU (sync, native only)
Sourcepub async fn gelu_async(
&self,
input: &[f32],
result: &mut [f32],
) -> Result<(), String>
pub async fn gelu_async( &self, input: &[f32], result: &mut [f32], ) -> Result<(), String>
Execute GELU activation on GPU (async, works on all platforms)
Sourcepub fn clip(
&self,
input: &[f32],
result: &mut [f32],
min_val: f32,
max_val: f32,
) -> Result<(), String>
pub fn clip( &self, input: &[f32], result: &mut [f32], min_val: f32, max_val: f32, ) -> Result<(), String>
Execute clip (clamp) operation on GPU (sync, native only)
Sourcepub async fn clip_async(
&self,
input: &[f32],
result: &mut [f32],
min_val: f32,
max_val: f32,
) -> Result<(), String>
pub async fn clip_async( &self, input: &[f32], result: &mut [f32], min_val: f32, max_val: f32, ) -> Result<(), String>
Execute clip (clamp) operation on GPU (async, works on all platforms)
Sourcepub fn softmax(&self, input: &[f32], result: &mut [f32]) -> Result<(), String>
pub fn softmax(&self, input: &[f32], result: &mut [f32]) -> Result<(), String>
Execute softmax on GPU (sync, native only)
Multi-pass implementation:
- Find max value (parallel reduction)
- Compute exp(x - max) (element-wise)
- Sum exp values (parallel reduction)
- Normalize by sum (element-wise)
Sourcepub async fn softmax_async(
&self,
input: &[f32],
result: &mut [f32],
) -> Result<(), String>
pub async fn softmax_async( &self, input: &[f32], result: &mut [f32], ) -> Result<(), String>
Execute softmax on GPU (async, works on all platforms)
Sourcepub fn log_softmax(
&self,
input: &[f32],
result: &mut [f32],
) -> Result<(), String>
pub fn log_softmax( &self, input: &[f32], result: &mut [f32], ) -> Result<(), String>
Execute log_softmax on GPU (sync, native only)
Multi-pass implementation:
- Find max value (parallel reduction)
- Compute exp(x - max) (element-wise)
- Sum exp values (parallel reduction)
- Compute log_softmax (element-wise)
Source§impl GpuDevice
impl GpuDevice
Sourcepub fn silu_backward(
&self,
input: &[f32],
grad_output: &[f32],
grad_input: &mut [f32],
) -> Result<(), String>
pub fn silu_backward( &self, input: &[f32], grad_output: &[f32], grad_input: &mut [f32], ) -> Result<(), String>
SiLU backward on GPU: grad_input[i] = grad_output[i] * silu’(input[i])
§Contract (FALSIFY-WGPU-001)
- Precondition: input.len() == grad_output.len() == grad_input.len()
- Postcondition: max|grad_input_gpu - grad_input_cpu| < 1e-4
Sourcepub async fn silu_backward_async(
&self,
input: &[f32],
grad_output: &[f32],
grad_input: &mut [f32],
) -> Result<(), String>
pub async fn silu_backward_async( &self, input: &[f32], grad_output: &[f32], grad_input: &mut [f32], ) -> Result<(), String>
SiLU backward on GPU (async)
Sourcepub fn gemm_backward_a(
&self,
grad_c: &[f32],
b: &[f32],
grad_a: &mut [f32],
m: u32,
k: u32,
n: u32,
) -> Result<(), String>
pub fn gemm_backward_a( &self, grad_c: &[f32], b: &[f32], grad_a: &mut [f32], m: u32, k: u32, n: u32, ) -> Result<(), String>
GEMM backward for A: grad_a[M,K] = grad_c[M,N] @ B^T[N,K]
§Contract (FALSIFY-WGPU-001)
- Precondition: grad_c.len() == mn, b.len() == kn, grad_a.len() == m*k
- Postcondition: max|grad_a_gpu - grad_a_cpu| < 1e-4
Sourcepub async fn gemm_backward_a_async(
&self,
grad_c: &[f32],
b: &[f32],
grad_a: &mut [f32],
m: u32,
k: u32,
n: u32,
) -> Result<(), String>
pub async fn gemm_backward_a_async( &self, grad_c: &[f32], b: &[f32], grad_a: &mut [f32], m: u32, k: u32, n: u32, ) -> Result<(), String>
GEMM backward for A (async): grad_a = grad_c @ B^T
Sourcepub fn gemm_backward_b(
&self,
a: &[f32],
grad_c: &[f32],
grad_b: &mut [f32],
m: u32,
k: u32,
n: u32,
) -> Result<(), String>
pub fn gemm_backward_b( &self, a: &[f32], grad_c: &[f32], grad_b: &mut [f32], m: u32, k: u32, n: u32, ) -> Result<(), String>
GEMM backward for B: grad_b[K,N] = A^T[K,M] @ grad_c[M,N]
Sourcepub async fn gemm_backward_b_async(
&self,
a: &[f32],
grad_c: &[f32],
grad_b: &mut [f32],
m: u32,
k: u32,
n: u32,
) -> Result<(), String>
pub async fn gemm_backward_b_async( &self, a: &[f32], grad_c: &[f32], grad_b: &mut [f32], m: u32, k: u32, n: u32, ) -> Result<(), String>
GEMM backward for B (async): grad_b = A^T @ grad_c
Sourcepub fn rope_backward(
&self,
grad_output: &[f32],
grad_input: &mut [f32],
num_heads: u32,
head_dim: u32,
seq_len: u32,
theta: f32,
) -> Result<(), String>
pub fn rope_backward( &self, grad_output: &[f32], grad_input: &mut [f32], num_heads: u32, head_dim: u32, seq_len: u32, theta: f32, ) -> Result<(), String>
RoPE backward on GPU: transpose rotation (negated sin)
§Contract (FALSIFY-WGPU-001)
Sourcepub async fn rope_backward_async(
&self,
grad_output: &[f32],
grad_input: &mut [f32],
num_heads: u32,
head_dim: u32,
seq_len: u32,
theta: f32,
) -> Result<(), String>
pub async fn rope_backward_async( &self, grad_output: &[f32], grad_input: &mut [f32], num_heads: u32, head_dim: u32, seq_len: u32, theta: f32, ) -> Result<(), String>
RoPE backward (async)
Sourcepub fn adamw_step(
&self,
params: &mut [f32],
grads: &[f32],
m: &mut [f32],
v: &mut [f32],
lr: f32,
beta1: f32,
beta2: f32,
eps: f32,
weight_decay: f32,
step: u32,
) -> Result<(), String>
pub fn adamw_step( &self, params: &mut [f32], grads: &[f32], m: &mut [f32], v: &mut [f32], lr: f32, beta1: f32, beta2: f32, eps: f32, weight_decay: f32, step: u32, ) -> Result<(), String>
AdamW optimizer step on GPU
Sourcepub async fn adamw_step_async(
&self,
params: &mut [f32],
grads: &[f32],
m: &mut [f32],
v: &mut [f32],
lr: f32,
beta1: f32,
beta2: f32,
eps: f32,
weight_decay: f32,
step: u32,
) -> Result<(), String>
pub async fn adamw_step_async( &self, params: &mut [f32], grads: &[f32], m: &mut [f32], v: &mut [f32], lr: f32, beta1: f32, beta2: f32, eps: f32, weight_decay: f32, step: u32, ) -> Result<(), String>
AdamW step (async)
Sourcepub fn rmsnorm_backward(
&self,
input: &[f32],
gamma: &[f32],
grad_output: &[f32],
grad_input: &mut [f32],
grad_gamma: &mut [f32],
num_rows: u32,
hidden_dim: u32,
eps: f32,
) -> Result<(), String>
pub fn rmsnorm_backward( &self, input: &[f32], gamma: &[f32], grad_output: &[f32], grad_input: &mut [f32], grad_gamma: &mut [f32], num_rows: u32, hidden_dim: u32, eps: f32, ) -> Result<(), String>
RMSNorm backward on GPU
Computes grad_input and accumulates grad_gamma via atomic CAS. One workgroup (256 threads) per row.
§Contract (FALSIFY-WGPU-001)
Sourcepub async fn rmsnorm_backward_async(
&self,
input: &[f32],
gamma: &[f32],
grad_output: &[f32],
grad_input: &mut [f32],
grad_gamma: &mut [f32],
num_rows: u32,
hidden_dim: u32,
eps: f32,
) -> Result<(), String>
pub async fn rmsnorm_backward_async( &self, input: &[f32], gamma: &[f32], grad_output: &[f32], grad_input: &mut [f32], grad_gamma: &mut [f32], num_rows: u32, hidden_dim: u32, eps: f32, ) -> Result<(), String>
RMSNorm backward (async)
Source§impl GpuDevice
impl GpuDevice
Sourcepub fn symmetric_eigen(
&self,
matrix: &[f32],
n: usize,
) -> Result<(Vec<f32>, Vec<f32>), String>
pub fn symmetric_eigen( &self, matrix: &[f32], n: usize, ) -> Result<(Vec<f32>, Vec<f32>), String>
Execute symmetric eigendecomposition on GPU (sync, native only)
Computes eigenvalues and eigenvectors using Jacobi algorithm with GPU-accelerated Givens rotations. Returns (eigenvalues, eigenvector_data) where eigenvector_data is in row-major format.
Source§impl GpuDevice
impl GpuDevice
Sourcepub fn convolve2d(
&self,
input: &[f32],
kernel: &[f32],
result: &mut [f32],
input_rows: usize,
input_cols: usize,
kernel_rows: usize,
kernel_cols: usize,
) -> Result<(), String>
pub fn convolve2d( &self, input: &[f32], kernel: &[f32], result: &mut [f32], input_rows: usize, input_cols: usize, kernel_rows: usize, kernel_cols: usize, ) -> Result<(), String>
Perform 2D convolution on GPU (sync, native only)
§Arguments
input- Input image (row-major)kernel- Convolution kernel (row-major)result- Output buffer (row-major)input_rows- Number of rows in inputinput_cols- Number of columns in inputkernel_rows- Number of rows in kernelkernel_cols- Number of columns in kernel
Output dimensions: (input_rows - kernel_rows + 1) x (input_cols - kernel_cols + 1)
Source§impl GpuDevice
impl GpuDevice
Source§impl GpuDevice
impl GpuDevice
Source§impl GpuDevice
impl GpuDevice
Sourcepub fn tiled_sum_2d(
&self,
data: &[f32],
width: usize,
height: usize,
) -> Result<f32, String>
pub fn tiled_sum_2d( &self, data: &[f32], width: usize, height: usize, ) -> Result<f32, String>
Sourcepub async fn tiled_sum_2d_async(
&self,
data: &[f32],
width: usize,
height: usize,
) -> Result<f32, String>
pub async fn tiled_sum_2d_async( &self, data: &[f32], width: usize, height: usize, ) -> Result<f32, String>
2D Tiled Sum Reduction on GPU (async, works on all platforms)
Sourcepub fn tiled_max_2d(
&self,
data: &[f32],
width: usize,
height: usize,
) -> Result<f32, String>
pub fn tiled_max_2d( &self, data: &[f32], width: usize, height: usize, ) -> Result<f32, String>
2D Tiled Max Reduction on GPU (sync, native only)
Uses 16x16 workgroups for efficient parallel max reduction.
GPU version of tiled_max_2d.
Sourcepub async fn tiled_max_2d_async(
&self,
data: &[f32],
width: usize,
height: usize,
) -> Result<f32, String>
pub async fn tiled_max_2d_async( &self, data: &[f32], width: usize, height: usize, ) -> Result<f32, String>
2D Tiled Max Reduction on GPU (async, works on all platforms)
Source§impl GpuDevice
impl GpuDevice
Sourcepub async fn new_async() -> Result<Self, String>
pub async fn new_async() -> Result<Self, String>
Initialize GPU device (async, works on all platforms)
Sourcepub fn new_with_adapter_index(index: u32) -> Result<Self, String>
pub fn new_with_adapter_index(index: u32) -> Result<Self, String>
Initialize GPU device with a specific adapter index (sync, native only)
Use this to select a specific GPU when multiple are available.
Adapter indices correspond to Instance::enumerate_adapters() ordering.
Sourcepub async fn new_with_adapter_index_async(index: u32) -> Result<Self, String>
pub async fn new_with_adapter_index_async(index: u32) -> Result<Self, String>
Initialize GPU device with a specific adapter index (async, all platforms)
Use this to select a specific GPU when multiple are available.
Adapter indices correspond to Instance::enumerate_adapters() ordering.
Sourcepub fn list_adapters() -> Vec<(u32, String, String)>
pub fn list_adapters() -> Vec<(u32, String, String)>
List all available GPU adapters (sync, native only)
Returns a list of (index, name, backend) tuples for each adapter.
Sourcepub async fn list_adapters_async() -> Vec<(u32, String, String)>
pub async fn list_adapters_async() -> Vec<(u32, String, String)>
List all available GPU adapters (async, all platforms)
Sourcepub fn is_available() -> bool
pub fn is_available() -> bool
Check if GPU is available (sync, native only)
Sourcepub async fn is_available_async() -> bool
pub async fn is_available_async() -> bool
Check if GPU is available (async, works on all platforms)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GpuDevice
impl !RefUnwindSafe for GpuDevice
impl Send for GpuDevice
impl Sync for GpuDevice
impl Unpin for GpuDevice
impl UnsafeUnpin for GpuDevice
impl !UnwindSafe for GpuDevice
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,
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.