pub struct L2BlockHeader {Show 33 fields
pub version: u16,
pub height: u64,
pub epoch: u64,
pub parent_hash: Bytes32,
pub state_root: Bytes32,
pub spends_root: Bytes32,
pub additions_root: Bytes32,
pub removals_root: Bytes32,
pub receipts_root: Bytes32,
pub l1_height: u32,
pub l1_hash: Bytes32,
pub timestamp: u64,
pub proposer_index: u32,
pub spend_bundle_count: u32,
pub total_cost: Cost,
pub total_fees: u64,
pub additions_count: u32,
pub removals_count: u32,
pub block_size: u32,
pub filter_hash: Bytes32,
pub extension_data: Bytes32,
pub l1_collateral_coin_id: Option<Bytes32>,
pub l1_reserve_coin_id: Option<Bytes32>,
pub l1_prev_epoch_finalizer_coin_id: Option<Bytes32>,
pub l1_curr_epoch_finalizer_coin_id: Option<Bytes32>,
pub l1_network_coin_id: Option<Bytes32>,
pub slash_proposal_count: u32,
pub slash_proposals_root: Bytes32,
pub collateral_registry_root: Bytes32,
pub cid_state_root: Bytes32,
pub node_registry_root: Bytes32,
pub namespace_update_root: Bytes32,
pub dfsp_finalize_commitment_root: Bytes32,
}Expand description
DIG L2 block header: identity, Merkle commitments, L1 anchor, metadata, optional L1 proofs, slash proposal commitments, and DFSP data-layer roots.
Field layout and semantics follow SPEC §2.2 table Field groups; keep this definition in sync with that section when the wire format evolves.
Fields§
§version: u16Protocol version (VERSION_V1 / VERSION_V2; BLK-007 selects from height).
height: u64Block height (genesis = 0).
epoch: u64Epoch number.
parent_hash: Bytes32Hash of the parent block header.
state_root: Bytes32CoinSet / state Merkle root after this block.
spends_root: Bytes32Merkle root of spend-bundle hashes.
additions_root: Bytes32Merkle root of additions (Chia-style grouping by puzzle_hash).
removals_root: Bytes32Merkle root of removed coin IDs.
receipts_root: Bytes32Merkle root of execution receipts.
l1_height: u32Chia L1 block height this L2 block references.
l1_hash: Bytes32Chia L1 block hash.
timestamp: u64Unix timestamp (seconds).
proposer_index: u32Proposer validator index.
spend_bundle_count: u32Number of spend bundles in the block body.
total_cost: CostAggregate CLVM cost of all spends in the block.
total_fees: u64Total fees (value in − value out).
additions_count: u32Number of coin additions.
removals_count: u32Number of coin removals.
block_size: u32Serialized full block size in bytes (header + body).
filter_hash: Bytes32BIP158-style compact block filter hash.
extension_data: Bytes32Reserved extension field (SPEC: default ZERO_HASH in constructors).
l1_collateral_coin_id: Option<Bytes32>Proposer L1 collateral proof coin id.
l1_reserve_coin_id: Option<Bytes32>Network validator collateral set anchor.
l1_prev_epoch_finalizer_coin_id: Option<Bytes32>Previous epoch finalization proof.
l1_curr_epoch_finalizer_coin_id: Option<Bytes32>Current epoch finalizer state.
l1_network_coin_id: Option<Bytes32>Network singleton existence proof.
slash_proposal_count: u32Number of slash proposal payloads in the body.
slash_proposals_root: Bytes32Merkle root over per-proposal hashes.
collateral_registry_root: Bytes32Collateral registry sparse Merkle root.
cid_state_root: Bytes32CID lifecycle state machine root.
node_registry_root: Bytes32Node registry sparse Merkle root.
namespace_update_root: Bytes32Namespace update delta root for this block.
dfsp_finalize_commitment_root: Bytes32DFSP epoch-boundary commitment digest.
Implementations§
Source§impl L2BlockHeader
impl L2BlockHeader
Sourcepub const HASH_PREIMAGE_LEN: usize = 710
pub const HASH_PREIMAGE_LEN: usize = 710
Byte length of the fixed preimage fed to Self::hash (all 33 rows of SPEC §3.1).
Accounting: 20×Bytes32 fields + u16 + 6×u64 + 7×u32 = 640 + 70 = 710 bytes.
The SPEC prose once said “626 bytes”; summing the §3.1 table yields 710 — this constant is authoritative for code.
Sourcepub fn protocol_version_for_height_with_activation(
height: u64,
dfsp_activation_height: u64,
) -> u16
pub fn protocol_version_for_height_with_activation( height: u64, dfsp_activation_height: u64, ) -> u16
Protocol version for height given an explicit DFSP activation height (BLK-007).
Rules: If dfsp_activation_height == u64::MAX (DFSP disabled sentinel), returns VERSION_V1.
Otherwise returns VERSION_V2 when height >= dfsp_activation_height, else VERSION_V1.
Rationale: Parameterizing activation height lets tests cover pre/post-fork behavior without
recompiling DFSP_ACTIVATION_HEIGHT. Production code
should call Self::protocol_version_for_height instead.
Sourcepub fn protocol_version_for_height(height: u64) -> u16
pub fn protocol_version_for_height(height: u64) -> u16
Protocol version for height using the crate’s DFSP_ACTIVATION_HEIGHT constant.
Sourcepub fn validate_with_dfsp_activation_at_unix(
&self,
dfsp_activation_height: u64,
now_secs: u64,
) -> Result<(), BlockError>
pub fn validate_with_dfsp_activation_at_unix( &self, dfsp_activation_height: u64, now_secs: u64, ) -> Result<(), BlockError>
Tier-1 header checks SVL-001 through SVL-004 with an explicit DFSP activation height and a fixed
now_secs reference for the timestamp bound (SVL-004).
SVL-001 / SPEC §5.1 Step 1: L2BlockHeader::version must match Self::protocol_version_for_height_with_activation
for L2BlockHeader::height and dfsp_activation_height; else BlockError::InvalidVersion.
SVL-002 / SPEC §5.1 Step 2: when height < dfsp_activation_height, all five DFSP roots must equal EMPTY_ROOT;
else BlockError::InvalidData (fixed message per SVL-002 spec).
SVL-003 / SPEC §5.1 Steps 3–4: total_cost > MAX_COST_PER_BLOCK ⇒ BlockError::CostExceeded; then
block_size > MAX_BLOCK_SIZE ⇒ BlockError::TooLarge (SVL-003 spec).
SVL-004 / SPEC §5.1 Step 5: let max_allowed = now_secs + MAX_FUTURE_TIMESTAMP_SECONDS. If
timestamp > max_allowed, reject with BlockError::TimestampTooFarInFuture (Chia block_header_validation.py
Check 26a analogue). Strict >: timestamp == max_allowed is accepted.
Usage: Production should call Self::validate or Self::validate_with_dfsp_activation (wall-clock now).
Integration tests call this method with a synthetic now_secs so boundary arithmetic is deterministic
(SVL-004 spec — Implementation Notes).
Sourcepub fn validate_with_dfsp_activation(
&self,
dfsp_activation_height: u64,
) -> Result<(), BlockError>
pub fn validate_with_dfsp_activation( &self, dfsp_activation_height: u64, ) -> Result<(), BlockError>
Same as Self::validate_with_dfsp_activation_at_unix after sampling the host wall clock (Self::unix_secs_wall_clock).
Rationale: Parameterizing dfsp_activation_height mirrors SVL-001 so integration tests can inject a finite
fork height; production uses Self::validate → DFSP_ACTIVATION_HEIGHT.
With the BLK-005 sentinel u64::MAX, every finite height satisfies height < u64::MAX, so DFSP payloads cannot
appear on-chain until governance lowers the constant.
SVL-004: Uses real SystemTime for now_secs. For deterministic timestamp tests, call
Self::validate_with_dfsp_activation_at_unix directly.
Sourcepub fn validate(&self) -> Result<(), BlockError>
pub fn validate(&self) -> Result<(), BlockError>
Sourcepub fn hash_preimage_bytes(&self) -> [u8; 710]
pub fn hash_preimage_bytes(&self) -> [u8; 710]
Serialize the exact 710-byte preimage for HSH-001 /
SPEC §3.1 (same order as Self::hash).
Usage: Tests and debug tooling can diff preimages without re-deriving field order; Self::hash is
SHA-256(self.hash_preimage_bytes()).
Optionals: Each Option<Bytes32> occupies 32 bytes: ZERO_HASH when None, raw bytes when Some.
Sourcepub fn hash(&self) -> Bytes32
pub fn hash(&self) -> Bytes32
Canonical block identity: SHA-256 over Self::hash_preimage_bytes (HSH-001).
Requirement: SPEC §3.1. Numeric fields are little-endian; each optional L1 anchor
contributes 32 bytes of raw Bytes32 or ZERO_HASH when None (malleability-safe encoding).
Primitive: chia_sha2::Sha256 only (crate::primitives / project crypto rules).
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Serialize this header to bincode bytes for wire / storage (SER-002, NORMATIVE § SER-002, SPEC §8.2).
Infallible: Uses Result::expect because an in-memory, well-formed L2BlockHeader should always serialize
with the crate’s serde schema; a panic indicates programmer error or schema drift, not recoverable I/O.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, BlockError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, BlockError>
Deserialize a header from bincode bytes (SER-002).
Errors: Any bincode failure maps to BlockError::InvalidData (message includes the decoder error) —
covers empty input, truncated payloads, corrupted bytes, and schema mismatches.
Sourcepub fn new(
height: u64,
epoch: u64,
parent_hash: Bytes32,
state_root: Bytes32,
spends_root: Bytes32,
additions_root: Bytes32,
removals_root: Bytes32,
receipts_root: Bytes32,
l1_height: u32,
l1_hash: Bytes32,
proposer_index: u32,
spend_bundle_count: u32,
total_cost: Cost,
total_fees: u64,
additions_count: u32,
removals_count: u32,
block_size: u32,
filter_hash: Bytes32,
) -> Self
pub fn new( height: u64, epoch: u64, parent_hash: Bytes32, state_root: Bytes32, spends_root: Bytes32, additions_root: Bytes32, removals_root: Bytes32, receipts_root: Bytes32, l1_height: u32, l1_hash: Bytes32, proposer_index: u32, spend_bundle_count: u32, total_cost: Cost, total_fees: u64, additions_count: u32, removals_count: u32, block_size: u32, filter_hash: Bytes32, ) -> Self
Standard header constructor (SPEC §2.2 Derived methods / new()).
Sets version via Self::protocol_version_for_height; timestamp to 0 (SPEC omits it from
the new parameter list—set explicitly or use Self::genesis / block builder for wall clock);
L1 proof anchors to None; slash summary to empty; DFSP roots to EMPTY_ROOT; extension_data
to ZERO_HASH.
Sourcepub fn new_with_collateral(
height: u64,
epoch: u64,
parent_hash: Bytes32,
state_root: Bytes32,
spends_root: Bytes32,
additions_root: Bytes32,
removals_root: Bytes32,
receipts_root: Bytes32,
l1_height: u32,
l1_hash: Bytes32,
proposer_index: u32,
spend_bundle_count: u32,
total_cost: Cost,
total_fees: u64,
additions_count: u32,
removals_count: u32,
block_size: u32,
filter_hash: Bytes32,
l1_collateral_coin_id: Bytes32,
) -> Self
pub fn new_with_collateral( height: u64, epoch: u64, parent_hash: Bytes32, state_root: Bytes32, spends_root: Bytes32, additions_root: Bytes32, removals_root: Bytes32, receipts_root: Bytes32, l1_height: u32, l1_hash: Bytes32, proposer_index: u32, spend_bundle_count: u32, total_cost: Cost, total_fees: u64, additions_count: u32, removals_count: u32, block_size: u32, filter_hash: Bytes32, l1_collateral_coin_id: Bytes32, ) -> Self
Like Self::new but sets L2BlockHeader::l1_collateral_coin_id to the given proof coin id.
Sourcepub fn new_with_l1_proofs(
height: u64,
epoch: u64,
parent_hash: Bytes32,
state_root: Bytes32,
spends_root: Bytes32,
additions_root: Bytes32,
removals_root: Bytes32,
receipts_root: Bytes32,
l1_height: u32,
l1_hash: Bytes32,
proposer_index: u32,
spend_bundle_count: u32,
total_cost: Cost,
total_fees: u64,
additions_count: u32,
removals_count: u32,
block_size: u32,
filter_hash: Bytes32,
l1_collateral_coin_id: Bytes32,
l1_reserve_coin_id: Bytes32,
l1_prev_epoch_finalizer_coin_id: Bytes32,
l1_curr_epoch_finalizer_coin_id: Bytes32,
l1_network_coin_id: Bytes32,
) -> Self
pub fn new_with_l1_proofs( height: u64, epoch: u64, parent_hash: Bytes32, state_root: Bytes32, spends_root: Bytes32, additions_root: Bytes32, removals_root: Bytes32, receipts_root: Bytes32, l1_height: u32, l1_hash: Bytes32, proposer_index: u32, spend_bundle_count: u32, total_cost: Cost, total_fees: u64, additions_count: u32, removals_count: u32, block_size: u32, filter_hash: Bytes32, l1_collateral_coin_id: Bytes32, l1_reserve_coin_id: Bytes32, l1_prev_epoch_finalizer_coin_id: Bytes32, l1_curr_epoch_finalizer_coin_id: Bytes32, l1_network_coin_id: Bytes32, ) -> Self
Full L1 proof anchor set (SPEC field order: collateral, reserve, prev/curr finalizer, network coin).
Sourcepub fn genesis(network_id: Bytes32, l1_height: u32, l1_hash: Bytes32) -> Self
pub fn genesis(network_id: Bytes32, l1_height: u32, l1_hash: Bytes32) -> Self
Genesis header (SER-003, NORMATIVE § SER-003, SPEC §8.3).
§Field obligations
height/epoch:0— chain bootstrap position.parent_hash:network_id— there is no prior L2 block; binding the parent slot to the network identity blocks cross-network replay of height-0 material (SER-003 summary).- Merkle / commitment roots:
EMPTY_ROOTfor state, spends, additions, removals, receipts, filter, slash proposals, and all DFSP layer roots;ZERO_HASHforextension_data(opaque extension slot starts empty). - Counts / costs / size: all zero; L1 anchor options: all
None; slash count:0. l1_height/l1_hash: caller-supplied L1 observation the genesis L2 header is anchored to.version:Self::protocol_version_for_height(0) — same BLK-007 auto-detection as every other constructor (notCARGO_PKG_VERSION; see SER-003 spec errata vs older pseudocode).
timestamp: wall-clock Unix seconds from SystemTime::now. Host clocks before 1970 cannot be represented;
we panic with a clear message (same contract as “real” wall time for genesis in SPEC §8.3).
Trait Implementations§
Source§impl Clone for L2BlockHeader
impl Clone for L2BlockHeader
Source§fn clone(&self) -> L2BlockHeader
fn clone(&self) -> L2BlockHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for L2BlockHeader
impl Debug for L2BlockHeader
Source§impl<'de> Deserialize<'de> for L2BlockHeader
impl<'de> Deserialize<'de> for L2BlockHeader
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for L2BlockHeader
impl PartialEq for L2BlockHeader
Source§impl Serialize for L2BlockHeader
impl Serialize for L2BlockHeader
Source§impl Streamable for L2BlockHeader
impl Streamable for L2BlockHeader
fn update_digest(&self, digest: &mut Sha256)
fn stream(&self, out: &mut Vec<u8>) -> Result<()>
fn parse<const TRUSTED: bool>(input: &mut Cursor<&[u8]>) -> Result<Self>
fn to_bytes(&self) -> Result<Vec<u8>, Error>
fn from_bytes(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn hash(&self) -> [u8; 32]
impl Eq for L2BlockHeader
impl StructuralPartialEq for L2BlockHeader
Auto Trait Implementations§
impl Freeze for L2BlockHeader
impl RefUnwindSafe for L2BlockHeader
impl Send for L2BlockHeader
impl Sync for L2BlockHeader
impl Unpin for L2BlockHeader
impl UnsafeUnpin for L2BlockHeader
impl UnwindSafe for L2BlockHeader
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> 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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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.