Skip to main content

SlashingError

Enum SlashingError 

Source
pub enum SlashingError {
Show 28 variants InvalidIndexedAttestation(String), BlsVerifyFailed, InvalidAttesterSlashing(String), AttesterSlashingNotSlashable, EmptySlashableIntersection, InvalidSlashingEvidence(String), InvalidProposerSlashing(String), ValidatorNotRegistered(u32), AlreadySlashed, ProposerUnavailable, PendingBookFull, BondLockFailed, ReporterIsAccused(u32), AppealPayloadTooLarge { actual: usize, limit: usize, }, AppellantBondLockFailed(String), SlashAlreadyReverted, SlashAlreadyFinalised, TooManyAttempts { count: usize, limit: usize, }, DuplicateAppeal, AppealVariantMismatch, AppealWindowExpired { submitted_at: u64, window: u64, current: u64, }, UnknownEvidence(String), EvidencePayloadTooLarge { actual: usize, limit: usize, }, BlockCapExceeded { actual: usize, limit: usize, }, DuplicateEvidence, ReorgTooDeep { depth: u64, limit: u64, }, AdmissionPuzzleHashMismatch { expected: Bytes32, got: Bytes32, }, OffenseTooOld { offense_epoch: u64, current_epoch: u64, },
}
Expand description

Every failure mode dig-slashing’s verifiers, manager, and adjudicator can return.

Per SPEC §17.1. Variants carry the minimum context needed to diagnose the failure without leaking internal state.

Variants§

§

InvalidIndexedAttestation(String)

IndexedAttestation failed its cheap structural check (DSL-005): empty indices, non-ascending/duplicate indices, over-cap length, or wrong-width signature.

Consumed by verify_attester_slashing (DSL-014/DSL-015) before any BLS work. Reason string describes the specific violation.

§

BlsVerifyFailed

Aggregate BLS verify returned false OR the signature bytes / pubkey set could not be decoded at all.

Raised by IndexedAttestation::verify_signature (DSL-006) and by verify_proposer_slashing / verify_invalid_block (DSL-013 / DSL-018). Intentionally coarse: the security model does not distinguish “bad pubkey width”, “missing validator index”, or “cryptographic mismatch” — all three are equally invalid evidence and callers MUST reject the envelope uniformly.

§

InvalidAttesterSlashing(String)

AttesterSlashing payload failed a structural / BLS precondition in DSL-014..016: byte-identical attestations, structural violation bubbled up from DSL-005, or BLS verify failure on one of the two aggregates.

Reason string names the specific violation. Predicate-failure paths use the dedicated SlashingError::AttesterSlashingNotSlashable and SlashingError::EmptySlashableIntersection variants so appeals (DSL-042, DSL-043) can distinguish without string matching.

§

AttesterSlashingNotSlashable

Neither the double-vote (DSL-014) nor the surround-vote (DSL-015) predicate holds for the two AttestationDatas.

Raised by DSL-017. Mirrored at the appeal layer by AttesterAppealGround::NotSlashableByPredicate (DSL-042).

§

EmptySlashableIntersection

The intersection of attestation_a.attesting_indices and attestation_b.attesting_indices is empty — no validator participated in both, so there is nobody to slash.

Raised by DSL-016 after the slashable-predicate check succeeds but the intersection yields zero indices. Mirrored at the appeal layer by AttesterAppealGround::EmptyIntersection (DSL-043).

§

InvalidSlashingEvidence(String)

InvalidBlockProof payload failed one of the preconditions in DSL-018..020: BLS verify failure over block_signing_message, header.epoch != evidence.epoch, out-of-range failure_witness, or the optional InvalidBlockOracle rejected the re-execution.

Reason string names the specific violation. Appeals (DSL-049..054) distinguish the categories at their own layer.

§

InvalidProposerSlashing(String)

ProposerSlashing payload failed one of the preconditions in DSL-013: slot mismatch, proposer mismatch, identical headers, bad signature bytes, inactive validator, or BLS verify failure on one of the two signatures.

Reason string names the specific violation for diagnostics (appeals in DSL-034..040 distinguish the same categories by structured variants; this coarse string is only the verifier’s rejection channel).

§

ValidatorNotRegistered(u32)

A validator index named in the evidence is not registered in the validator view.

Raised by DSL-013 (accused proposer) and DSL-018 (invalid-block proposer). Carries the offending index.

§

AlreadySlashed

Duplicate submit_evidence for an evidence.hash() already in the manager’s processed map.

Raised by DSL-026 as the FIRST pipeline check — before verify, capacity check, bond lock, or any state mutation. Persists across pending statuses (Accepted, ChallengeOpen, Reverted, Finalised) until a reorg rewind (DSL-129) or prune clears the entry.

§

ProposerUnavailable

ProposerView::proposer_at_slot(current_slot) returned None.

Raised by DSL-025 reward routing. A None here is a consensus-layer bug — the proposer at the current slot must always exist at admission time. Surfaces as a hard error rather than silently dropping the proposer reward.

§

PendingBookFull

PendingSlashBook at capacity; new slashes cannot be admitted until existing ones finalise or revert.

Raised by DSL-027. MAX_PENDING_SLASHES = 4_096 caps memory + pruning cost. Admission attempt at capacity performs no bond lock or validator mutation.

§

BondLockFailed

Reporter bond lock failed — principal lacks collateral or the escrow rejected the tag.

Raised by DSL-023 in SlashingManager::submit_evidence when BondEscrow::lock(reporter_idx, REPORTER_BOND_MOJOS, Reporter(hash)) returns Err(_). No state mutation occurs — the manager has not yet touched ValidatorEntry::slash_absolute.

§

ReporterIsAccused(u32)

The evidence reporter named themselves among the slashable validators (self-accuse).

Raised by verify_evidence (DSL-012) when evidence.reporter_validator_index ∈ evidence.slashable_validators(). Blocks a validator from self-slashing to collect the whistleblower reward (DSL-025 reward routing). Payload is the offending validator index so the adjudicator can log without re-deriving it.

§

AppealPayloadTooLarge

Serialized SlashAppeal exceeds MAX_APPEAL_PAYLOAD_BYTES.

Raised by DSL-063. Caps memory + DoS cost for invalid-block witness storage. Runs BEFORE the DSL-062 bond lock so an oversized appeal never reaches collateral.

Fields

§actual: usize

Actual bincode-encoded length in bytes.

§limit: usize

MAX_APPEAL_PAYLOAD_BYTES at the time of check.

§

AppellantBondLockFailed(String)

Appellant-bond lock failed — principal lacks collateral or the escrow rejected the tag.

Raised by DSL-062 in SlashingManager::submit_appeal when BondEscrow::lock(appellant_idx, APPELLANT_BOND_MOJOS, Appellant(appeal_hash)) returns Err(_). Runs as the LAST step of the admission pipeline so all structural rejections (DSL-055..061, DSL-063) short-circuit first. The carried string is the underlying BondError rendered via Display.

§

SlashAlreadyReverted

Pending slash is already in the Reverted terminal state — no further appeals are accepted.

Raised by DSL-060. A sustained appeal (DSL-064..070) transitions the book entry to Reverted{..}. Additional appeals against a reverted slash would have nothing to revert; the check short-circuits cheaply before bond lock.

§

SlashAlreadyFinalised

Pending slash is already in the Finalised terminal state — no further appeals are accepted.

Raised by DSL-061. Window closed, correlation penalty applied, exit lock scheduled. Terminal; non-actionable.

§

TooManyAttempts

Appellant ran out of distinct attempts against this pending slash.

Raised by DSL-059. Caps adjudication cost at MAX_APPEAL_ATTEMPTS_PER_SLASH (4). Only REJECTED attempts accumulate — a sustained appeal transitions the slash to Reverted and drains the book entry, so the counter can never exceed the cap in practice.

Fields

§count: usize

Attempts already recorded in appeal_history.

§limit: usize

MAX_APPEAL_ATTEMPTS_PER_SLASH at the time of check.

§

DuplicateAppeal

Byte-equal appeal already present in PendingSlash::appeal_history.

Raised by DSL-058. Prevents an appellant from spamming the adjudicator with identical rejected appeals. Near-duplicates (different witness bytes or different ground) are accepted; only byte-equal envelopes trip this check. Runs AFTER AppealVariantMismatch (DSL-057) and BEFORE bond lock (DSL-062).

§

AppealVariantMismatch

Appeal’s payload variant does not match the evidence’s payload variant (e.g., ProposerSlashingAppeal filed against AttesterSlashing evidence).

Raised by DSL-057. Cheap structural check — no state inspection beyond the two enum tags. Runs AFTER DSL-055 (UnknownEvidence) + DSL-056 (WindowExpired) and BEFORE any bond operation.

§

AppealWindowExpired

Appeal filed after the slash’s appeal window closed.

Raised by DSL-056. The window is [submitted_at_epoch, submitted_at_epoch + SLASH_APPEAL_WINDOW_EPOCHS] — inclusive on BOTH ends (the boundary epoch itself is still a valid filing). Bond is NOT locked on this path; precondition order guarantees this.

Fields

§submitted_at: u64

Epoch the slash was admitted at.

§window: u64

SLASH_APPEAL_WINDOW_EPOCHS at the time of admission.

§current: u64

appeal.filed_epoch — the epoch the appeal claims it was filed at.

§

UnknownEvidence(String)

Appeal’s evidence_hash does not match any entry in the PendingSlashBook.

Raised by DSL-055 as the FIRST precondition in SlashingManager::submit_appeal — checked BEFORE any bond lock so callers can retry cheaply. The carried string is the hex encoding of the 32-byte evidence hash for diagnostic logging (the raw bytes remain available at the call site).

§

EvidencePayloadTooLarge

Serialized evidence payload exceeds MAX_SLASH_PROPOSAL_PAYLOAD_BYTES.

Raised by DSL-109 enforce_slashing_evidence_payload_cap. Caps memory + DoS cost for invalid-block witness storage inside a single REMARK. Mirrors the appeal-side SlashingError::AppealPayloadTooLarge (DSL-063); the two variants are kept distinct because callers upstream route them through different admission pipelines.

Fields

§actual: usize

Actual JSON-encoded length in bytes.

§limit: usize

MAX_SLASH_PROPOSAL_PAYLOAD_BYTES at the time of check.

§

BlockCapExceeded

Block-level evidence cap exceeded (evidence_count > MAX_SLASH_PROPOSALS_PER_BLOCK) or appeal cap exceeded (appeal_count > MAX_APPEALS_PER_BLOCK).

Raised by DSL-108 enforce_block_level_slashing_caps and DSL-119 enforce_block_level_appeal_caps. Caps bound per-block admission cost — each evidence triggers DSL-103 puzzle-hash derivation + BLS verification downstream, so a hard cap keeps block-validation time predictable. Carries both the actual count and the limit so operators can tell whether they are hitting the proposal or the appeal ceiling without re-deriving constants.

Fields

§actual: usize

Number of REMARK items observed in the block.

§limit: usize

MAX_SLASH_PROPOSALS_PER_BLOCK or MAX_APPEALS_PER_BLOCK at the time of check.

§

DuplicateEvidence

Mempool policy caught a byte-identical evidence between pending_evidence and incoming_evidence, or a duplicate within incoming_evidence itself.

Raised by DSL-107 enforce_slashing_evidence_mempool_dedup_policy. Fingerprint is the JSON wire bytes (serde_json::to_vec). Separate from the manager-level dedup SlashingError::AlreadySlashed (DSL-026) which operates on the evidence.hash() digest and runs inside the slashing manager; this variant runs earlier in the mempool upstream of any manager state.

§

ReorgTooDeep

Reorg depth exceeds the retention window the trackers can reconstruct.

Raised by DSL-130 rewind_all_on_reorg when current_epoch - new_tip_epoch > CORRELATION_WINDOW_EPOCHS. The correlation window is the deepest per-validator state we retain; anything older cannot be rewound correctly because the slashed_in_window rows have been pruned (DSL-127 step 8) and the participation / inactivity trackers do not keep per-epoch snapshots.

An embedder receiving this error must fall back to a longer-range reconciliation path (full resync or checkpoint restore); the slashing crate cannot handle the rewind locally.

Fields

§depth: u64

current_epoch - new_tip_epoch — how far back the reorg wants to move.

§limit: u64

CORRELATION_WINDOW_EPOCHS at the time of check.

§

AdmissionPuzzleHashMismatch

REMARK admission found an evidence whose derived slashing_evidence_remark_puzzle_hash_v1 does NOT match the spent coin’s puzzle_hash.

Raised by DSL-104/105 enforcement. The payload on-chain (the REMARK bytes) binds to a puzzle hash at coin creation time; if the admitted spend references a coin whose puzzle_hash does not equal the recomputed hash, an attacker is attempting to launder a payload through a coin that never committed to it. Carries both hashes for diagnostic logging; the check runs BEFORE any state mutation.

Fields

§expected: Bytes32

Puzzle hash derived from the parsed evidence via slashing_evidence_remark_puzzle_hash_v1.

§got: Bytes32

coin.puzzle_hash on the admitted spend.

§

OffenseTooOld

Offense epoch is older than SLASH_LOOKBACK_EPOCHS relative to the current epoch.

Raised by verify_evidence (DSL-011) as the very first check — cheap filter BEFORE any BLS or validator-view work. The check is evidence.epoch + SLASH_LOOKBACK_EPOCHS < current_epoch, phrased with addition on the LHS to avoid underflow when current_epoch < SLASH_LOOKBACK_EPOCHS (e.g., at network boot). Carries both epochs so adjudicators can diagnose the exact delta without re-deriving it.

Fields

§offense_epoch: u64

Epoch the evidence claims the offense occurred at.

§current_epoch: u64

Current epoch as seen by the verifier.

Trait Implementations§

Source§

impl Clone for SlashingError

Source§

fn clone(&self) -> SlashingError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SlashingError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SlashingError

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for SlashingError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for SlashingError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for SlashingError

Source§

fn eq(&self, other: &SlashingError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SlashingError

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for SlashingError

Source§

impl StructuralPartialEq for SlashingError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .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
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .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
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,