pub struct DataOverlay {
pub values: HashMap<DataPath, LiteralValue>,
pub violated: HashMap<DataPath, String>,
}Expand description
User-provided data values resolved against a plan’s type declarations.
Lightweight and cheap to construct — no plan cloning required. The
ExecutionPlan stays immutable; callers pass (&ExecutionPlan, &DataOverlay)
to evaluation and schema methods.
Fields§
§values: HashMap<DataPath, LiteralValue>Successfully parsed and validated values supplied by the caller.
violated: HashMap<DataPath, String>Values that failed parse or constraint validation. Rules that read
these paths produce [crate::evaluation::VetoType::Computation] vetoes.
Implementations§
Source§impl DataOverlay
impl DataOverlay
Sourcepub fn resolve(
plan: &ExecutionPlan,
raw_values: HashMap<String, DataValueInput>,
limits: &ResourceLimits,
) -> Result<Self, Error>
pub fn resolve( plan: &ExecutionPlan, raw_values: HashMap<String, DataValueInput>, limits: &ResourceLimits, ) -> Result<Self, Error>
Parse and validate caller-supplied values against the plan’s data declarations.
Unknown data keys and resource-limit violations return Err. Per-field
parse or constraint failures are recorded in Self::violated and the
overlay is still returned as Ok.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for DataOverlay
impl Clone for DataOverlay
Source§fn clone(&self) -> DataOverlay
fn clone(&self) -> DataOverlay
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 Debug for DataOverlay
impl Debug for DataOverlay
Source§impl Default for DataOverlay
impl Default for DataOverlay
Source§fn default() -> DataOverlay
fn default() -> DataOverlay
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DataOverlay
impl RefUnwindSafe for DataOverlay
impl Send for DataOverlay
impl Sync for DataOverlay
impl Unpin for DataOverlay
impl UnsafeUnpin for DataOverlay
impl UnwindSafe for DataOverlay
Blanket Implementations§
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