pub enum ValidationTask<'a> {
CheckTypeMatch {
key: Cow<'a, str>,
value: Cow<'a, str>,
type_name: Cow<'a, str>,
line: usize,
},
VerifySchemaExists {
schema_name: Cow<'a, str>,
line: usize,
},
VerifyFileExists {
path: Cow<'a, str>,
line: usize,
},
ValidateAgainstSchema {
schema_name: Cow<'a, str>,
key: Cow<'a, str>,
value: Cow<'a, str>,
line: usize,
},
CheckSchemaCompleteness {
schema_name: Cow<'a, str>,
missing_fields: Vec<Cow<'a, str>>,
line: usize,
},
CheckNoCircularReference {
key: Cow<'a, str>,
line: usize,
},
CheckDeriveCompleteness {
derive_path: Cow<'a, str>,
current_key: Cow<'a, str>,
line: usize,
},
ValidateListElements {
key: Cow<'a, str>,
items: Arc<[ValueNode<'a>]>,
element_type: Cow<'a, str>,
line: usize,
},
ValidateObjectStructure {
key: Cow<'a, str>,
pairs: Arc<[(Cow<'a, str>, ValueNode<'a>)]>,
line: usize,
},
}Expand description
A declarative validation task generated by the Validator.
Validation tasks represent specific checks that need to be performed on AST nodes.
They are generated during the validation phase and executed by ValidateExecutor.
Variants§
CheckTypeMatch
Check if a value matches a registered type’s constraints.
§Fields
key: The configuration key being validatedvalue: The value to validatetype_name: Name of the type to validate against (e.g., “i32”, “string”, “vector2”)line: Source line number for diagnostics
VerifySchemaExists
Verify that a schema referenced in the configuration is defined.
§Fields
schema_name: Name of the schema to checkline: Source line number
VerifyFileExists
Verify that a file referenced by an import directive exists.
§Fields
path: Path to the fileline: Source line number
ValidateAgainstSchema
Validate that an assignment complies with a registered schema.
§Fields
schema_name: Name of the schema to validate againstkey: Key being validatedvalue: Value being validatedline: Source line number
CheckSchemaCompleteness
Check that all required fields of a schema are present.
§Fields
schema_name: Schema namemissing_fields: Required fields not foundline: Source line number
CheckNoCircularReference
Verify no circular references in lookup chains.
§Fields
key: Key being looked upline: Source line number
CheckDeriveCompleteness
Verify that an object deriving from schemas implements all required fields.
§Fields
derive_path: Derivation path (file.aam::Schema1::Schema2)current_key: The context key doing the derivationline: Source line number
ValidateListElements
Validate an inline list matches expected element types.
§Fields
key: Configuration keyitems: List items as stringselement_type: Expected type of each elementline: Source line number
ValidateObjectStructure
Validate an inline object’s keys and values.
§Fields
key: Configuration keypairs: Key-value pairs in the objectline: Source line number
Implementations§
Source§impl ValidationTask<'_>
impl ValidationTask<'_>
Trait Implementations§
Source§impl<'a> Clone for ValidationTask<'a>
impl<'a> Clone for ValidationTask<'a>
Source§fn clone(&self) -> ValidationTask<'a>
fn clone(&self) -> ValidationTask<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ValidationTask<'a>
impl<'a> Debug for ValidationTask<'a>
impl<'a> Eq for ValidationTask<'a>
Source§impl<'a> PartialEq for ValidationTask<'a>
impl<'a> PartialEq for ValidationTask<'a>
Source§fn eq(&self, other: &ValidationTask<'a>) -> bool
fn eq(&self, other: &ValidationTask<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for ValidationTask<'a>
Auto Trait Implementations§
impl<'a> Freeze for ValidationTask<'a>
impl<'a> RefUnwindSafe for ValidationTask<'a>
impl<'a> Send for ValidationTask<'a>
impl<'a> Sync for ValidationTask<'a>
impl<'a> Unpin for ValidationTask<'a>
impl<'a> UnsafeUnpin for ValidationTask<'a>
impl<'a> UnwindSafe for ValidationTask<'a>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.