Trait client_side_validation::ClientData
source · pub trait ClientData<'client_data>where
Self: 'client_data,{
type ValidationReport: ValidationReport;
type SealIterator: Iterator<Item = &'client_data <<Self::ValidationReport as ValidationReport>::SealIssue as SealIssue>::Seal>;
// Required methods
fn single_use_seals(&'client_data self) -> Self::SealIterator;
fn validate_internal_consistency(
&'client_data self
) -> Status<Self::ValidationReport>;
}
Expand description
Marker trait for client-side-validation data at any level of data hierarchy.
Required Associated Types§
sourcetype ValidationReport: ValidationReport
type ValidationReport: ValidationReport
Data type that stores validation report configuration for the validation
Status
object.
This type defines also a type of single-use-seals via
ValidationReport::SealIssue
<Seal>
.
sourcetype SealIterator: Iterator<Item = &'client_data <<Self::ValidationReport as ValidationReport>::SealIssue as SealIssue>::Seal>
type SealIterator: Iterator<Item = &'client_data <<Self::ValidationReport as ValidationReport>::SealIssue as SealIssue>::Seal>
Iterator over single-use-seals belonging to a specific validation item.
Required Methods§
sourcefn single_use_seals(&'client_data self) -> Self::SealIterator
fn single_use_seals(&'client_data self) -> Self::SealIterator
Method returning iterator over single-use-seal references corresponding to the current piece of client-side-validated data.
sourcefn validate_internal_consistency(
&'client_data self
) -> Status<Self::ValidationReport>
fn validate_internal_consistency( &'client_data self ) -> Status<Self::ValidationReport>
Validates internal consistency of the current client-side-validated data item. Must not validate any single-use-seals or commitments against external commitment mediums.
The method should not iterate over internal data items and go deeper
inside the data hierarchy and must validate only data related to the
single current item. The iteration is performed at higher levels,
normally as a part of ClientSideValidate::client_side_validate
method logic.