proteus 0.5.0

Proteus is intended to make dynamic transformation of data using serde serializable, deserialize using JSON and a JSON transformation syntax similar to Javascript JSON syntax. It also supports registering custom Actions to be used in the syntax.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::num::ParseIntError;
use thiserror::Error;

/// This type represents all possible errors that an occur while parsing transformation syntax to generate a [Namespace](enum.Namespace.html) to be used in [Getter](../struct.Getter.html).
#[derive(Error, Debug)]
pub enum Error {
    #[error("Invalid '.' notation for namespace: {}. {}", ns, err)]
    InvalidDotNotation { err: String, ns: String },

    #[error(transparent)]
    InvalidNamespaceArrayIndex(#[from] ParseIntError),

    #[error("Missing end bracket ']' in array index for namespace: {0}")]
    MissingArrayIndexBracket(String),

    #[error("Invalid Explicit Key Syntax for namespace {0}. Explicit Key Syntax must start with '[\"' and end with '\"]' with any enclosed '\"' escaped.")]
    InvalidExplicitKeySyntax(String),
}