pub trait BuildUnchecked: Sized {
type Output;
type Error: Error + Send + Sync + 'static;
// Required method
fn build_unchecked(self) -> Result<Self::Output, Self::Error>;
}Expand description
Constructs a domain object from decoded fields while skipping selected verification checks.
This is an explicit, handwritten capability, independent of Verify and VerifyWith.
Implement it only where the domain API supports unchecked construction. Construction can still
fail on remaining checks or conversions; use core::convert::Infallible when it cannot fail.
Collection field wrappers implement this capability when their elements do, preserving
presence, order, duplicates, and keys. They stop at the first construction error, retaining
its field, index, or key context. They do not invoke Verify or check collection invariants.
§Warning
Implementations must document precisely which checks are skipped, including nested checks,
and which invariants callers must ensure. The output is not guaranteed to be verified. This
operation must not bypass wire decoding checks or silently discard verification errors.
Skipping domain validation alone does not make this a Rust unsafe operation.
Required Associated Types§
Required Methods§
fn build_unchecked(self) -> Result<Self::Output, Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<S> BuildUnchecked for Box<S>where
S: BuildUnchecked,
Preserves the box and delegates construction; the caller must ensure the invariants
documented by S’s BuildUnchecked implementation.
impl<S> BuildUnchecked for Box<S>where
S: BuildUnchecked,
Preserves the box and delegates construction; the caller must ensure the invariants
documented by S’s BuildUnchecked implementation.
type Output = Box<<S as BuildUnchecked>::Output>
type Error = <S as BuildUnchecked>::Error
fn build_unchecked( self, ) -> Result<<Box<S> as BuildUnchecked>::Output, <Box<S> as BuildUnchecked>::Error>
Implementors§
Source§impl BuildUnchecked for BlockBody
Checks body invariants, but trusts transaction ordering and unchecked input-note commitments.
impl BuildUnchecked for BlockBody
Checks body invariants, but trusts transaction ordering and unchecked input-note commitments.
Source§impl BuildUnchecked for BlockHeader
Builds a header without validating its parent linkage, signatures, or protocol transition.
impl BuildUnchecked for BlockHeader
Builds a header without validating its parent linkage, signatures, or protocol transition.
type Output = BlockHeader
type Error = VerificationError
Source§impl BuildUnchecked for InputNoteCommitment
Builds the decoded commitment without checking that its nullifier belongs to its note header.
A present header is verified, but the caller must establish nullifier/header consistency and
authenticate the note’s inclusion separately. An absent header is not evidence of inclusion.
impl BuildUnchecked for InputNoteCommitment
Builds the decoded commitment without checking that its nullifier belongs to its note header. A present header is verified, but the caller must establish nullifier/header consistency and authenticate the note’s inclusion separately. An absent header is not evidence of inclusion.
type Output = InputNoteCommitment
type Error = VerificationError
Source§impl BuildUnchecked for PartialBlockchain
Checks MMR reconstruction and header membership, but not header parent linkage or a trusted
root.
impl BuildUnchecked for PartialBlockchain
Checks MMR reconstruction and header membership, but not header parent linkage or a trusted root.
type Output = PartialBlockchain
type Error = VerificationError
Source§impl BuildUnchecked for ProvenBatch
Checks local batch invariants, but not proof validity, note aggregation, or transaction
ordering.
impl BuildUnchecked for ProvenBatch
Checks local batch invariants, but not proof validity, note aggregation, or transaction ordering.
type Output = ProvenBatch
type Error = VerificationError
Source§impl BuildUnchecked for ProvenTransaction
Checks transaction construction invariants, but not its proof or input-note authentication.
impl BuildUnchecked for ProvenTransaction
Checks transaction construction invariants, but not its proof or input-note authentication.
type Output = ProvenTransaction
type Error = VerificationError
Source§impl BuildUnchecked for SignedBlock
Checks header/body consistency but does not authenticate against a trusted parent.
impl BuildUnchecked for SignedBlock
Checks header/body consistency but does not authenticate against a trusted parent.
type Output = SignedBlock
type Error = VerificationError
Source§impl BuildUnchecked for TransactionHeader
Builds a header using unchecked input-note commitments. Input/output note uniqueness,
note-header invariants, and the transmitted transaction ID are still checked. The caller must
establish each input’s nullifier/header consistency and authentication, the original note order,
and the account ID’s relationship to the transaction data.
impl BuildUnchecked for TransactionHeader
Builds a header using unchecked input-note commitments. Input/output note uniqueness, note-header invariants, and the transmitted transaction ID are still checked. The caller must establish each input’s nullifier/header consistency and authentication, the original note order, and the account ID’s relationship to the transaction data.
type Output = TransactionHeader
type Error = VerificationError
Source§impl BuildUnchecked for TransactionInputs
Dispatches the decoded version without adding trust to the supplied headers or chain.
impl BuildUnchecked for TransactionInputs
Dispatches the decoded version without adding trust to the supplied headers or chain.
type Output = TransactionInputs
type Error = VerificationError
Source§impl BuildUnchecked for TransactionInputsV1
Checks input consistency and note inclusion against supplied headers, without authenticating the
chain.
impl BuildUnchecked for TransactionInputsV1
Checks input consistency and note inclusion against supplied headers, without authenticating the chain.
type Output = TransactionInputs
type Error = VerificationError
Source§impl<K, S> BuildUnchecked for MapField<BTreeMap<K, S>>
Builds each value in key order, preserving keys. The caller must ensure the invariants
documented by S for every value, as well as any collection-wide invariants.
impl<K, S> BuildUnchecked for MapField<BTreeMap<K, S>>
Builds each value in key order, preserving keys. The caller must ensure the invariants
documented by S for every value, as well as any collection-wide invariants.
type Output = BTreeMap<K, <S as BuildUnchecked>::Output>
type Error = ConversionError
Source§impl<K, S> BuildUnchecked for MapField<HashMap<K, S>>
Available on crate feature std only.Builds each value in unspecified order, preserving keys. The caller must ensure the
invariants documented by S for every value, as well as any collection-wide invariants.
impl<K, S> BuildUnchecked for MapField<HashMap<K, S>>
std only.Builds each value in unspecified order, preserving keys. The caller must ensure the
invariants documented by S for every value, as well as any collection-wide invariants.
type Output = HashMap<K, <S as BuildUnchecked>::Output>
type Error = ConversionError
Source§impl<S> BuildUnchecked for OptionalField<S>where
S: BuildUnchecked,
Builds the present value; the caller must ensure the invariants documented by S.
impl<S> BuildUnchecked for OptionalField<S>where
S: BuildUnchecked,
Builds the present value; the caller must ensure the invariants documented by S.
type Output = Option<<S as BuildUnchecked>::Output>
type Error = ConversionError
Source§impl<S> BuildUnchecked for RepeatedField<S>where
S: BuildUnchecked,
Builds each value in input order, preserving duplicates. The caller must ensure the
invariants documented by S for every value, as well as any collection-wide invariants.
impl<S> BuildUnchecked for RepeatedField<S>where
S: BuildUnchecked,
Builds each value in input order, preserving duplicates. The caller must ensure the
invariants documented by S for every value, as well as any collection-wide invariants.