vrl/cli/
mod.rs

1#![deny(warnings, clippy::pedantic)]
2pub mod cmd;
3mod repl;
4
5use crate::compiler::runtime::Terminate;
6pub use cmd::{Opts, cmd};
7
8#[derive(thiserror::Error, Debug)]
9pub enum Error {
10    #[error("io error: {}", .0)]
11    Io(#[from] std::io::Error),
12
13    // this is the set of rendered end-user diagnostic errors when a VRL program fails to compile
14    #[error("{}", .0)]
15    Parse(String),
16
17    #[error(transparent)]
18    Runtime(#[from] Terminate),
19
20    #[error("input error: {}", .0)]
21    Json(#[from] serde_json::Error),
22
23    #[error("repl feature disabled, program input required")]
24    ReplFeature,
25
26    #[error("error setting up readline: {}", .0)]
27    Readline(#[from] rustyline::error::ReadlineError),
28}