pub trait ValidationContext {
type Error;
// Required methods
fn get_node_type_info(
&self,
node_id: &NodeId,
) -> Result<TypeInfoForValidation, Self::Error>;
fn schema_origin(&self) -> &SchemaOrigin;
fn allow_ownership(&self) -> bool;
fn allow_non_global_ref(&self) -> bool;
}
Expand description
We use a trait here so it can be implemented either by the System API (mid-execution) or by off-ledger systems