Skip to main content

xidl_parser/rest_hir/
mod.rs

1mod attr;
2mod mapping;
3mod model;
4mod project;
5mod project_params;
6mod route;
7pub mod semantics;
8#[cfg(test)]
9mod tests;
10mod validate;
11
12use serde::{Deserialize, Serialize};
13
14pub use model::*;
15pub use project::project;
16
17/// Selects the projected HIR shape produced from typed AST input.
18#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
19pub enum HirProjectionKind {
20    Rpc,
21    Http,
22    JsonRpc,
23}
24
25/// Represents either the standard DDS/RPC HIR or the projected REST HIR.
26#[derive(Debug, Clone, Serialize, Deserialize)]
27pub enum ProjectedHir {
28    Rpc(crate::hir::Specification),
29    Http(RestHirDocument),
30    JsonRpc(crate::jsonrpc_hir::JsonRpcHirDocument),
31}
32
33pub(crate) type RestHirResult<T> = Result<T, String>;