/// Verifies this `CompiledModule`, returning a `VerifiedModule` on success.
///
/// On failure, returns the original `CompiledModule` and a list of verification errors.
///
/// There is a partial order on the checks. For example, the duplication check must precede the
/// structural recursion check. In general, later checks are more expensive.
Verifies this `CompiledModule`, returning a `VerifiedModule` on success.
On failure, returns the original `CompiledModule` and a list of verification errors.

There is a partial order on the checks. For example, the duplication check must precede the
structural recursion check. In general, later checks are more expensive.
Verifies this ` CompiledModule ` returning a ` VerifiedModule ` on success . On failure returns the original ` CompiledModule ` and a list of verification errors . There is a partial order on the checks . For example the duplication check must precede the structural recursion check . In general later checks are more expensive .
pub fn new(module: CompiledModule) -> Result<Self, (CompiledModule, Vec<VerificationError>)> {
        // All CompiledModule instances are statically guaranteed to be bounds checked, so there's
        // no need for more checking.
        let mut errors = DuplicationChecker::new(&module).verify();
        if errors.is_empty() {
            errors.append(&mut SignatureChecker::new(&module).verify());
            errors.append(&mut ResourceTransitiveChecker::new(&module).verify());
        }
        if errors.is_empty() {
            errors.append(&mut RecursiveStructDefChecker::new(&module).verify());
        }
        if errors.is_empty() {
            errors.append(&mut CodeUnitVerifier::new(&module).verify());
        }
        if errors.is_empty() {
            Ok(VerifiedModule(module))
        } else {
            Err((module, errors))
        }
    }
pub fn new ( module : CompiledModule ) -> Result < Self , ( CompiledModule , Vec < VerificationError > ) > { // All CompiledModule instances are statically guaranteed to be bounds checked, so there's // no need for more checking. let mut errors = DuplicationChecker :: new ( & module ) . verify ( ) ; if errors . is_empty ( ) { errors . append ( & mut SignatureChecker :: new ( & module ) . verify ( ) ) ; errors . append ( & mut ResourceTransitiveChecker :: new ( & module ) . verify ( ) ) ; } if errors . is_empty ( ) { errors . append ( & mut RecursiveStructDefChecker :: new ( & module ) . verify ( ) ) ; } if errors . is_empty ( ) { errors . append ( & mut CodeUnitVerifier :: new ( & module ) . verify ( ) ) ; } if errors . is_empty ( ) { Ok ( VerifiedModule ( module ) ) } else { Err ( ( module , errors ) ) } }
Verifies this `CompiledModule`, returning a `VerifiedModule` on success.
Verifies this ` CompiledModule ` returning a ` VerifiedModule ` on success .
module
CompiledModule