difftreelog
feat(evaluator) error cloning
in: master
2 files changed
crates/jsonnet-evaluator/src/error.rsdiffbeforeafterboth2use jsonnet_parser::LocExpr;2use jsonnet_parser::LocExpr;3use std::path::PathBuf;3use std::path::PathBuf;445#[derive(Debug)]5#[derive(Debug, Clone)]6pub enum Error {6pub enum Error {7 VariableIsNotDefined(String),7 VariableIsNotDefined(String),8 TypeMismatch(&'static str, Vec<ValType>, ValType),8 TypeMismatch(&'static str, Vec<ValType>, ValType),393940#[derive(Clone, Debug)]40#[derive(Clone, Debug)]41pub struct StackTraceElement(pub LocExpr, pub String);41pub struct StackTraceElement(pub LocExpr, pub String);42#[derive(Debug)]42#[derive(Debug, Clone)]43pub struct StackTrace(pub Vec<StackTraceElement>);43pub struct StackTrace(pub Vec<StackTraceElement>);444445#[derive(Debug)]45#[derive(Debug, Clone)]46pub struct LocError(pub Error, pub StackTrace);46pub struct LocError(pub Error, pub StackTrace);47pub type Result<V> = std::result::Result<V, LocError>;47pub type Result<V> = std::result::Result<V, LocError>;4848crates/jsonnet-evaluator/src/val.rsdiffbeforeafterboth96 }96 }97}97}989899#[derive(Debug)]99#[derive(Debug, Clone)]100pub enum ValType {100pub enum ValType {101 Bool,101 Bool,102 Null,102 Null,