typescript_webidl/types/
mod.rs1pub struct WebIdlResult {
5 pub root: oak_idl::ast::IdlRoot,
7 pub typescript: String,
9}
10
11pub enum WebIdlError {
13 ParseError(String),
15 ConvertError(String),
17}
18
19impl std::fmt::Display for WebIdlError {
20 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21 match self {
22 WebIdlError::ParseError(msg) => write!(f, "Parse error: {}", msg),
23 WebIdlError::ConvertError(msg) => write!(f, "Convert error: {}", msg),
24 }
25 }
26}
27
28impl std::fmt::Debug for WebIdlError {
29 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
30 write!(f, "{}", self)
31 }
32}
33
34impl std::error::Error for WebIdlError {}