pub fn validate(
        schema: &Schema,
        root: Option<&Schema>,
        consignment: &'validator Consignment,
        resolver: R,
    ) -> Status {
        let mut validator = Validator::init(consignment, resolver);

        validator.validate_schema(schema, root);
        // We must return here, since if the schema is not valid there is no
        // reason to validate contract nodes against it: it will produce a
        // plenty of errors
        if validator.status.validity() == Validity::Invalid {
            return validator.status;
        }

        let byte_code = if schema.script.byte_code.is_empty() {
            root.map(|root| &root.script.byte_code)
                .unwrap_or(&schema.script.byte_code)
        } else {
            &schema.script.byte_code
        };

        validator.validate_contract(schema, byte_code);

        // Done. Returning status report with all possible failures, issues,
        // warnings and notifications about transactions we were unable to
        // obtain.
        validator.status
    }
/// Validation procedure takes a schema object, root schema (if any),
/// resolver function returning transaction and its fee for a given
/// transaction id, and returns a validation object listing all detected
/// failures, warnings and additional information.
///
/// When a failure detected, it not stopped; the failure is is logged into
/// the status object, but the validation continues for the rest of the
/// consignment data. This can help it debugging and detecting all problems
/// with the consignment.
Validation procedure takes a schema object, root schema (if any),
resolver function returning transaction and its fee for a given
transaction id, and returns a validation object listing all detected
failures, warnings and additional information.

When a failure detected, it not stopped; the failure is is logged into
the status object, but the validation continues for the rest of the
consignment data. This can help it debugging and detecting all problems
with the consignment.
Validation procedure takes a schema object root schema ( if any ) resolver function returning transaction and its fee for a given transaction id and returns a validation object listing all detected failures warnings and additional information . When a failure detected it not stopped ; the failure is is logged into the status object but the validation continues for the rest of the consignment data . This can help it debugging and detecting all problems with the consignment .
pub fn validate(
        schema: &Schema,
        root: Option<&Schema>,
        consignment: &'validator Consignment,
        resolver: R,
    ) -> Status {
        let mut validator = Validator::init(consignment, resolver);
        validator.validate_schema(schema, root);
        // We must return here, since if the schema is not valid there is no
        // reason to validate contract nodes against it: it will produce a
        // plenty of errors
        if validator.status.validity() == Validity::Invalid {
            return validator.status;
        }
        let byte_code = if schema.script.byte_code.is_empty() {
            root.map(|root| &root.script.byte_code)
                .unwrap_or(&schema.script.byte_code)
        } else {
            &schema.script.byte_code
        };
        validator.validate_contract(schema, byte_code);
        // Done. Returning status report with all possible failures, issues,
        // warnings and notifications about transactions we were unable to
        // obtain.
        validator.status
    }
pub fn validate ( schema : & Schema , root : Option < & Schema > , consignment : & ' validator Consignment , resolver : R , ) -> Status { let mut validator = Validator :: init ( consignment , resolver ) ; validator . validate_schema ( schema , root ) ; // We must return here, since if the schema is not valid there is no // reason to validate contract nodes against it: it will produce a // plenty of errors if validator . status . validity ( ) == Validity :: Invalid { return validator . status ; } let byte_code = if schema . script . byte_code . is_empty ( ) { root . map ( | root | & root . script . byte_code ) . unwrap_or ( & schema . script . byte_code ) } else { & schema . script . byte_code } ; validator . validate_contract ( schema , byte_code ) ; // Done. Returning status report with all possible failures, issues, // warnings and notifications about transactions we were unable to // obtain. validator . status }
Validation procedure takes a schema object, root schema (if any),
resolver function returning transaction and its fee for a given
transaction id, and returns a validation object listing all detected
failures, warnings and additional information.
Validation procedure takes a schema object root schema ( if any ) resolver function returning transaction and its fee for a given transaction id and returns a validation object listing all detected failures warnings and additional information .
schema
&Schema
root
Option<&Schema>
consignment
&'validator Consignment
resolver
R