//! Abstraction for parse-time script validation. //! //! Lives in `shared` so the manager can call into validation logic //! without taking a hard dep on the executor crate. The executor-core //! crate provides the impl by registering `Engine` as a `ScriptValidator`. use thiserror::Error; #[derive(Debug, Error)] pub enum ValidationError { #[error("invalid script source: {0}")] Syntax(String), } pub trait ScriptValidator: Send + Sync { fn validate(&self, source: &str) -> Result<(), ValidationError>; }