pub trait DataContractValueConversionMethodsV0 {
// Required method
fn from_value(
raw_object: Value,
full_validation: bool,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>
where Self: Sized;
}Expand description
platform_value deserialization for DataContract with an explicit
validation flag.
from_value(value, full_validation, pv) is the single entry point: pass
true on trust boundaries (SDK ingest, fixture loaders, contract
registration) to run full schema validation, and false to reconstruct
already-trusted data (e.g. storage reads) without re-validating it.
For serialization, use canonical ValueConvertible::to_object /
platform_value::to_value(&data_contract) directly — there is no
validation dimension to writing.
Required Methods§
Sourcefn from_value(
raw_object: Value,
full_validation: bool,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
fn from_value(
raw_object: Value,
full_validation: bool,
platform_version: &PlatformVersion,
) -> Result<Self, ProtocolError>where
Self: Sized,
Deserialize from a platform_value::Value, running full schema
validation when full_validation is true.