Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/jexl-eval/src/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  error.rs

  Sprache: Rust
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


use jexl_parser::{ast::OpCode, LexError, ParseError, Token};

use serde_json::Value;

pub type Result<'a, T, E = EvaluationError<'a>> = std::result::Result<T, E>;
#[derive(Debug, thiserror::Error)]
pub enum EvaluationError<'a> {
    #[error("Parsing error: {0}")]
    ParseError(Box<ParseError<usize, Token<'a>, LexError>>),
    #[error("Invalid binary operation, left: {left}, right: {right}, operation: {operation}")]
    InvalidBinaryOp {
        left: Value,
        right: Value,
        operation: OpCode,
    },
    #[error("Unknown transform: {0}")]
    UnknownTransform(String),
    #[error("Duplicate object key: {0}")]
    DuplicateObjectKey(String),
    #[error("Identifier '{0}' is undefined")]
    UndefinedIdentifier(String),
    #[error("Invalid context provided")]
    InvalidContext,
    #[error("Invalid index type")]
    InvalidIndexType,
    #[error("Invalid json: {0}")]
    JSONError(#[from] serde_json::Error),
    #[error("Custom error: {0}")]
    CustomError(#[from] anyhow::Error),
    #[error("Invalid filter")]
    InvalidFilter,
}

impl<'a> From<ParseError<usize, Token<'a>, LexError>> for EvaluationError<'a> {
    fn from(cause: ParseError<usize, Token<'a>, LexError>) -> Self {
        EvaluationError::ParseError(Box::new(cause))
    }
}

Messung V0.5 in Prozent
C=91 H=97 G=93

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.