Skip to main content

Verify

Trait Verify 

Source
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§

Source

type Verified

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn verify(self) -> Result<Self::Verified, 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> Verify for Box<S>
where S: Verify,

Source§

type Verified = Box<<S as Verify>::Verified>

Source§

type Error = <S as Verify>::Error

Source§

fn verify( self, ) -> Result<<Box<S> as Verify>::Verified, <Box<S> as Verify>::Error>

Implementors§

Source§

impl Verify for Account

Source§

impl Verify for AccountCode

Source§

impl Verify for AccountFile

Source§

impl Verify for AccountFileV1

Source§

impl Verify for AccountHeader

Source§

impl Verify for AccountId

Source§

impl Verify for AccountIdV1

Source§

impl Verify for AccountPatch

Source§

impl Verify for AccountStorage

Source§

impl Verify for AccountStorageHeader

Source§

impl Verify for AccountStorageHeaderStorageSlot

Source§

impl Verify for AccountStoragePatch

Source§

impl Verify for AccountUpdateDetails

Source§

impl Verify for AccountVaultPatch

Source§

impl Verify for AccountVaultPatchEntry

Source§

impl Verify for AccountWitness

Source§

impl Verify for AdviceInputs

Source§

impl Verify for AdviceMap

Source§

impl Verify for AdviceMapEntry

Source§

impl Verify for AdviceStack

Source§

impl Verify for Asset

Source§

impl Verify for AssetClass

Source§

impl Verify for AssetId

Source§

impl Verify for AssetVault

Source§

impl Verify for AuthSecretKey

Returns the canonical secret key; it is not checked against any account.

Source§

impl Verify for AuthenticatedInputNote

Checks proof/note identity, not inclusion against a trusted block root.

Source§

impl Verify for BatchAccountUpdate

Source§

impl Verify for BlockAccountUpdate

Source§

impl Verify for BlockNumber

Source§

impl Verify for CommittedNote

Source§

impl Verify for ExpectedNote

Source§

impl Verify for FeeParameters

Source§

impl Verify for ForeignAccountSlotName

Source§

impl Verify for IndexedDigest

Source§

impl Verify for IndexedOutputNote

Source§

impl Verify for IndexedSmtLeaf

Source§

impl Verify for InputNote

Source§

impl Verify for InputNotes

Source§

impl Verify for KernelConfig

Source§

impl Verify for MastForest

Source§

impl Verify for MerklePath

Source§

impl Verify for MerkleStore

Source§

impl Verify for MerkleStoreNode

Source§

impl Verify for MmrDelta

Source§

impl Verify for NextProtocolConfig

Source§

impl Verify for Note

Source§

impl Verify for NoteArgument

Source§

impl Verify for NoteAttachment

Source§

impl Verify for NoteAttachments

Source§

impl Verify for NoteDetails

Source§

impl Verify for NoteFile

Source§

impl Verify for NoteFileV1

Source§

impl Verify for NoteHeader

Source§

impl Verify for NoteId

Source§

impl Verify for NoteInclusionProof

Source§

impl Verify for NoteMetadata

Source§

impl Verify for NoteRecipient

Source§

impl Verify for NoteScript

Source§

impl Verify for NoteStorage

Source§

impl Verify for NoteSyncHint

Source§

impl Verify for OutputNote

Source§

impl Verify for OutputNoteBatch

Source§

impl Verify for PartialAccount

Source§

impl Verify for PartialMmr

Checks reconstruction against the supplied peaks without authenticating those peaks.

Source§

impl Verify for PartialNote

Source§

impl Verify for PartialNoteMetadata

Source§

impl Verify for PartialSmt

Source§

impl Verify for PartialSmtNode

Source§

impl Verify for PartialSmtNodeLevel

Source§

impl Verify for PartialStorage

Source§

impl Verify for PartialStorageMap

Source§

impl Verify for PartialVault

Source§

impl Verify for PrivateAccountUpdate

Source§

impl Verify for PrivateOutputNote

Source§

impl Verify for ProofSecurityPolicy

Source§

impl Verify for ProofVerificationConfig

Source§

impl Verify for ProtocolConfig

Source§

impl Verify for PublicKey

Returns the canonical public key; ownership and authorization are not established here.

Source§

impl Verify for PublicOutputNote

Source§

impl Verify for RawOutputNote

Source§

impl Verify for RawOutputNotes

Source§

impl Verify for Signature

Returns the canonical signature; authenticity requires a public key and signed message.

Source§

impl Verify for SmtLeaf

Source§

impl Verify for SmtLeafEntry

Source§

impl Verify for SmtLeafEntryList

Source§

impl Verify for SmtOpening

Source§

impl Verify for SparseMerklePath

Source§

impl Verify for StorageMap

Source§

impl Verify for StorageMapEntry

Source§

impl Verify for StorageMapPatch

Source§

impl Verify for StorageMapPatchEntries

Source§

impl Verify for StorageSlot

Source§

impl Verify for StorageSlotId

Source§

impl Verify for StorageSlotPatch

Source§

impl Verify for StorageValuePatch

Source§

impl Verify for TrackedMmrLeaf

Source§

impl Verify for TransactionArgs

Source§

impl Verify for TransactionEffects

Dispatches the decoded version.

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.

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.

Source§

impl Verify for TransactionId

Source§

impl Verify for TransactionScript

Source§

impl Verify for TxAccountUpdate

Source§

impl Verify for ValidatorConfig

Source§

impl<K, S> Verify for MapField<BTreeMap<K, S>>
where K: Ord + Debug, S: Verify,

Source§

impl<K, S> Verify for MapField<HashMap<K, S>>
where K: Eq + Hash + Debug, S: Verify,

Available on crate feature std only.
Source§

impl<S> Verify for OptionalField<S>
where S: Verify,

Source§

impl<S> Verify for RepeatedField<S>
where S: Verify,