pub trait Profile: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn version(&self) -> &'static str;
fn source_url(&self) -> &'static str;
fn supported_types(&self) -> &[&str];
fn evaluate_node(
&self,
node: &SchemaNode,
vocab_diagnostics: &[ValidationDiagnostic],
) -> NodeProfileResult;
}Expand description
A deployment profile adds platform-specific rules beyond Schema.org vocabulary validation.
Each profile defines which types it covers and how to evaluate nodes against its requirements (required fields, recommended fields, nested sub-requirements, etc.).
Required Methods§
Sourcefn version(&self) -> &'static str
fn version(&self) -> &'static str
Profile version – date-based to track when rules were last verified against the platform’s documentation.
Sourcefn source_url(&self) -> &'static str
fn source_url(&self) -> &'static str
Source documentation URL.
Sourcefn supported_types(&self) -> &[&str]
fn supported_types(&self) -> &[&str]
Which Schema.org types does this profile cover?
The engine checks each node’s types against this list to decide whether to evaluate it.
Sourcefn evaluate_node(
&self,
node: &SchemaNode,
vocab_diagnostics: &[ValidationDiagnostic],
) -> NodeProfileResult
fn evaluate_node( &self, node: &SchemaNode, vocab_diagnostics: &[ValidationDiagnostic], ) -> NodeProfileResult
Evaluate a single node against this profile’s rules.
Called by the engine for each node whose type matches
supported_types().
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".