pub trait Verify: Sized {
type Verified;
type Error: Error + Send + Sync + 'static;
// Required method
fn verify(self) -> Result<Self::Verified, Self::Error>;
}Expand description
Checks domain invariants and constructs the verified type using ordinary Rust.
Verification errors belong to the domain. Cross-field checks need not correspond to a
single wire field.
Types that require external context can implement VerifyWith instead.
Boxes delegate to the contained verifier, preserving its error type and boxing the output.
Generated decoded records retain collections in crate::OptionalField,
crate::RepeatedField, or crate::MapField. Calling verify() on these fields verifies
their elements with the generated field name and index or key context. These helpers return
ConversionError, preserving the original source, and stop at the first error.
For element verifiers whose error is core::convert::Infallible, the wrappers also provide
verify_infallible(), returning the verified collection directly.
Collection-wide invariants remain the responsibility of the containing verifier. Use the
wrappers’ map() or try_map() methods for explicit element conversions; try_map() retains
field, index, and key context. Use into_inner() for custom collection-wide processing.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Implementors§
Source§impl Verify for AccountCode
impl Verify for AccountCode
type Verified = AccountCode
type Error = VerificationError
Source§impl Verify for AccountHeader
impl Verify for AccountHeader
type Verified = AccountHeader
type Error = VerificationError
Source§impl Verify for AccountIdV1
impl Verify for AccountIdV1
type Verified = AccountIdV1
type Error = AccountIdError
Source§impl Verify for AccountPatch
impl Verify for AccountPatch
type Verified = AccountPatch
type Error = VerificationError
Source§impl Verify for AccountStorageHeader
impl Verify for AccountStorageHeader
type Verified = AccountStorageHeader
type Error = VerificationError
Source§impl Verify for AccountStorageHeaderStorageSlot
impl Verify for AccountStorageHeaderStorageSlot
type Verified = StorageSlotHeader
type Error = StorageSlotNameError
Source§impl Verify for AccountStoragePatch
impl Verify for AccountStoragePatch
type Verified = AccountStoragePatch
type Error = VerificationError
Source§impl Verify for AccountUpdateDetails
impl Verify for AccountUpdateDetails
type Verified = AccountUpdateDetails
type Error = VerificationError
Source§impl Verify for AccountVaultPatch
impl Verify for AccountVaultPatch
type Verified = AccountVaultPatch
type Error = VerificationError
Source§impl Verify for AccountVaultPatchEntry
impl Verify for AccountVaultPatchEntry
Source§impl Verify for AccountWitness
impl Verify for AccountWitness
type Verified = AccountWitness
type Error = VerificationError
Source§impl Verify for AdviceInputs
impl Verify for AdviceInputs
type Verified = AdviceInputs
type Error = AdviceError
Source§impl Verify for AuthenticatedInputNote
Checks proof/note identity, not inclusion against a trusted block root.
impl Verify for AuthenticatedInputNote
Checks proof/note identity, not inclusion against a trusted block root.
Source§impl Verify for BatchAccountUpdate
impl Verify for BatchAccountUpdate
type Verified = BatchAccountUpdate
type Error = VerificationError
Source§impl Verify for BlockAccountUpdate
impl Verify for BlockAccountUpdate
type Verified = BlockAccountUpdate
type Error = VerificationError
Source§impl Verify for ForeignAccountSlotName
impl Verify for ForeignAccountSlotName
type Verified = (StorageSlotId, StorageSlotName)
type Error = VerificationError
Source§impl Verify for IndexedOutputNote
impl Verify for IndexedOutputNote
type Verified = (usize, OutputNote)
type Error = VerificationError
Source§impl Verify for IndexedSmtLeaf
impl Verify for IndexedSmtLeaf
Source§impl Verify for InputNotes
impl Verify for InputNotes
type Verified = InputNotes<InputNote>
type Error = VerificationError
Source§impl Verify for KernelConfig
impl Verify for KernelConfig
type Verified = KernelConfig
type Error = ProtocolConfigError
Source§impl Verify for MastForest
impl Verify for MastForest
type Verified = MastForest
type Error = MastForestError
Source§impl Verify for MerkleStore
impl Verify for MerkleStore
type Verified = MerkleStore
type Error = AdviceError
Source§impl Verify for NextProtocolConfig
impl Verify for NextProtocolConfig
type Verified = NextProtocolConfig
type Error = ProtocolConfigError
Source§impl Verify for NoteAttachment
impl Verify for NoteAttachment
type Verified = NoteAttachment
type Error = VerificationError
Source§impl Verify for NoteAttachments
impl Verify for NoteAttachments
type Verified = NoteAttachments
type Error = VerificationError
Source§impl Verify for NoteDetails
impl Verify for NoteDetails
type Verified = NoteDetails
type Error = VerificationError
Source§impl Verify for NoteHeader
impl Verify for NoteHeader
type Verified = NoteHeader
type Error = VerificationError
Source§impl Verify for NoteInclusionProof
impl Verify for NoteInclusionProof
type Verified = (NoteId, NoteInclusionProof)
type Error = VerificationError
Source§impl Verify for NoteMetadata
impl Verify for NoteMetadata
type Verified = NoteMetadata
type Error = VerificationError
Source§impl Verify for NoteRecipient
impl Verify for NoteRecipient
type Verified = NoteRecipient
type Error = VerificationError
Source§impl Verify for NoteScript
impl Verify for NoteScript
type Verified = NoteScript
type Error = VerificationError
Source§impl Verify for OutputNote
impl Verify for OutputNote
type Verified = OutputNote
type Error = VerificationError
Source§impl Verify for OutputNoteBatch
impl Verify for OutputNoteBatch
type Verified = Vec<(usize, OutputNote)>
type Error = VerificationError
Source§impl Verify for PartialAccount
impl Verify for PartialAccount
type Verified = PartialAccount
type Error = VerificationError
Source§impl Verify for PartialNote
impl Verify for PartialNote
type Verified = PartialNote
type Error = VerificationError
Source§impl Verify for PartialNoteMetadata
impl Verify for PartialNoteMetadata
type Verified = PartialNoteMetadata
type Error = VerificationError
Source§impl Verify for PartialSmt
impl Verify for PartialSmt
type Verified = PartialSmt
type Error = VerificationError
Source§impl Verify for PartialSmtNodeLevel
impl Verify for PartialSmtNodeLevel
Source§impl Verify for PartialStorage
impl Verify for PartialStorage
type Verified = PartialStorage
type Error = VerificationError
Source§impl Verify for PartialStorageMap
impl Verify for PartialStorageMap
type Verified = PartialStorageMap
type Error = VerificationError
Source§impl Verify for PartialVault
impl Verify for PartialVault
type Verified = PartialVault
type Error = VerificationError
Source§impl Verify for PrivateAccountUpdate
impl Verify for PrivateAccountUpdate
Source§impl Verify for PrivateOutputNote
impl Verify for PrivateOutputNote
type Verified = PrivateOutputNote
type Error = VerificationError
Source§impl Verify for ProofSecurityPolicy
impl Verify for ProofSecurityPolicy
type Verified = ProofSecurityPolicy
type Error = VerificationError
Source§impl Verify for ProofVerificationConfig
impl Verify for ProofVerificationConfig
Source§impl Verify for ProtocolConfig
impl Verify for ProtocolConfig
type Verified = ProtocolConfig
type Error = VerificationError
Source§impl Verify for PublicKey
Returns the canonical public key; ownership and authorization are not established here.
impl Verify for PublicKey
Returns the canonical public key; ownership and authorization are not established here.
Source§impl Verify for PublicOutputNote
impl Verify for PublicOutputNote
type Verified = PublicOutputNote
type Error = VerificationError
Source§impl Verify for RawOutputNote
impl Verify for RawOutputNote
type Verified = RawOutputNote
type Error = VerificationError
Source§impl Verify for RawOutputNotes
impl Verify for RawOutputNotes
Source§impl Verify for Signature
Returns the canonical signature; authenticity requires a public key and signed message.
impl Verify for Signature
Returns the canonical signature; authenticity requires a public key and signed message.
Source§impl Verify for SmtLeafEntryList
impl Verify for SmtLeafEntryList
Source§impl Verify for SmtOpening
impl Verify for SmtOpening
Source§impl Verify for SparseMerklePath
impl Verify for SparseMerklePath
type Verified = SparseMerklePath
type Error = MerkleError
Source§impl Verify for StorageMapEntry
impl Verify for StorageMapEntry
Source§impl Verify for StorageMapPatch
impl Verify for StorageMapPatch
type Verified = StorageMapPatch
type Error = StorageMapPatchError
Source§impl Verify for StorageMapPatchEntries
impl Verify for StorageMapPatchEntries
Source§impl Verify for StorageSlotPatch
impl Verify for StorageSlotPatch
type Verified = (StorageSlotName, StorageSlotPatch)
type Error = VerificationError
Source§impl Verify for StorageValuePatch
impl Verify for StorageValuePatch
Source§impl Verify for TrackedMmrLeaf
impl Verify for TrackedMmrLeaf
Source§impl Verify for TransactionArgs
impl Verify for TransactionArgs
type Verified = TransactionArgs
type Error = VerificationError
Source§impl Verify for TransactionEffects
Dispatches the decoded version.
impl Verify for TransactionEffects
Dispatches the decoded version.
type Verified = TransactionEffects
type Error = VerificationError
Source§impl Verify for TransactionEffectsV1
Verifies the effects. The account patch, the input notes and the output notes are each
verified, and both note collections are checked for duplicates and length limits.
impl Verify for TransactionEffectsV1
Verifies the effects. The account patch, the input notes and the output notes are each verified, and both note collections are checked for duplicates and length limits.
The reference block commitment is not checked against the reference block number, the account patch is not checked to belong to the account the transaction ran against, and input notes are not authenticated.