pub trait DataContractDocumentValidationMethodsV0 {
// Required methods
fn validate_document(
&self,
name: &str,
document: &Document,
platform_version: &PlatformVersion,
) -> Result<SimpleConsensusValidationResult, ProtocolError>;
fn validate_document_properties(
&self,
name: &str,
value: Value,
system: &DocumentSystemValues,
platform_version: &PlatformVersion,
) -> Result<SimpleConsensusValidationResult, ProtocolError>;
}Required Methods§
fn validate_document( &self, name: &str, document: &Document, platform_version: &PlatformVersion, ) -> Result<SimpleConsensusValidationResult, ProtocolError>
Sourcefn validate_document_properties(
&self,
name: &str,
value: Value,
system: &DocumentSystemValues,
platform_version: &PlatformVersion,
) -> Result<SimpleConsensusValidationResult, ProtocolError>
fn validate_document_properties( &self, name: &str, value: Value, system: &DocumentSystemValues, platform_version: &PlatformVersion, ) -> Result<SimpleConsensusValidationResult, ProtocolError>
Validates a document’s properties, value, against its document type: the
schema, the string byte caps and the propertyConstraints rules. system holds
the system values of the document version being written, what a rule’s $ownerId
and system times and heights read: an owner the caller does not know equals no
identifier, and a rule reading a time or height it does not know is not judged.
Consensus passes the writer and the block’s time and heights on create, and the
stored ones where a replace keeps them.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".